The keyword private , followed by some number of identifiers or binding specifications. The identifiers introduced in a private clause name instance variables, just like those in public clause, but the identifiers are bound only inside the definition of this class. The keyword override , followed by some number of identifiers of binding specifications. Again, the identifiers name instance variables. In this case, however, they must also be the names of public instance variables of the parent class, and the new bindings of the identifiers replace the old ones in objects of this new class.
Instance variables introduced in override -clauses are public.
The keyword inherit , followed by some number of identifiers, which must be the names of public instance variables of the parent class. This clause makes the names of the inherited instance variables visible inside this class, so that they can be used in subsequent binding expressions. The keyword rename , followed by some number of two-element lists of identifiers. The three private instance variables correspond to the three static variables in our earlier definition, and the public instance variables, which all have procedures as their values, correspond to the messages. Exercise 2 Create a queue, enqueue the symbols 'foo , 'bar , and 'baz , dequeue the front element, and check the size of the queue.