Desired Properties (Cont.)


Implications of a Class Hierarchy
Objects belonging to a subclass inherit those properties defined in its superclass, unless the properties are overwritten by the subclass.


      Customer: What’s the WiFi password?    
      Barman: You need to buy a drink first.    
      Customer: Ok, I’ll have a coke.    
      Barman: $10 please.    
      Customer: There you go. So what’s the wifi password?    
      Barman: You need to buy a drink first. No spaces, all lowercase!