======================================================= CSE 341 Spring 96 -- 4/22/96 ======================================================= Schedule of upcoming events: 1. Problem set L2 due Friday 4/26. 2. Lisp Quiz in Section on Tuesday 2/23 3. Section on Thursday 2/25 will be in the PC lab. Last time: 1. A look at the elevator code This time: 1. Lisp wrapup 2. Smalltalk intro Reading: Goldberg, Chapters 1 and 2 ====================================================== Discussion points for (any) programming language: 1. Basic computational paradigm (functional, object oriented, logical, applicative) 2. Variables (scope) 3. Data types; type checking and coercion -- what are the primitive data types -- what methods are available for forming composites -- when and how is type checking accomplished 4. Function calling -- parameter passing -- return results 5. Memory management 6. Data abstraction, modularization, data hiding ====================================================== Introduction to the Smalltalk *Language* 1. Basic computational paradigm object-oriented, interactive, integrated execution/development enviornment 2. Basic OO concepts -- EVERYTHING is an object -- Objects are organized into CLASSES -- ALL computation is message passing (Example: the class Account) 3. Objects -- what are the primitive data types, and how do I create them? -- how do I create a "non-primitive" object? -- how do I initiate a computation? 4. Literals -- numbers 1.25 4 -- characters $M -- strings 'abc' <<< -- comment "abc" >>> !!!!!!!! -- symbols #fred -- boolean true, false -- the mystery value nil 5. Built-in constants nil true false 6. Variables and naming Variables: aGoodVariableName Global variables and classes: AGlobalVariable (ALMOST NEVER!) Ratio, LongInteger, OrderedCollection 7. Methods and naming Unary messages 1.5 negate Binary "operators" 2 + 3 Non-unary messages anArray at: 2 put: 27.3 Ambiguity: anArray at: 2 - 3 negate put: 27.3 + 4 reciprocal negate