CSE 130 Lecture Notes - Lecture 11: Master Sergeant, Subtyping, Code Reuse
Document Summary
Oo languages: dynamic lookup, encapsulation, subtyping, inheritance. Selector: name of a message (i. e. method name) Method: code used when responding to message: dynamic lookup (object. message(args)) Vs. adts - have no messages! ( behavioral , not structural) Here we are talking about algebraic data types. Depends on implementation of object receiving the msg. In overloading, we use the same selector (based on the type) I. e. use the same symbol to refer to different implementations. Ex: 1 + 1 vs 1. 0 + 1. 0. For (var i = 0 to arra length) { In here: we send msg +arrb[i] to object arra[i] Statically determine which piece of code to execute. Restrict access to a program component according to its specified interface. In the industry, we care about the end product, we don"t care how it"s done, as long as it provides the needed functionality. User of a component (has an abstract view) Apply fixed set of operations provided by builder.