In Smalltalk, what is the difference between class variables and instance variables?
Class Variables: • Available without make instance of class. • Available to class + instance methods. • Declared once per class. • All instances share one copy of each class variable. Instance Variables: • Require an object instance. • Each instance variable is unique to it’s particular instance. • Created each time a instance is created. (For more reading, read “How to Use Class Variables and Class Instance Variables”… an 8 pg. document!) http://www.smalltalksystems.com/publications/cvars&cinst_vars.doc (Smalltalk/V doesn’t have class instance variables apparently… see above.) In Smalltalk, what is the difference between class and instance methods. • Class methods have access only to class variables and other class methods. • Instance methods have access to both (class and instance) (methods and variables) • Class methods do not require instantiation to be executed. • Instance methods do. Objects await messages. ex: (Pg. 71, Fall 2004 Review page) • Instances of Box understand “in