Usually inheritance works well if it actually matches the real world relationship you are modeling.
Originally posted by Stan James:
A couple trivial "real world" examples in geometry: a circle "is an" elipse and a square "is a" rectangle, but modeling circle or square through inheritance gets you into big trouble, most likely with Liskov.
Originally posted by ak pillai:
The guide is that inheritance should be only used when subclass �is a� superclass.
Unless they were trying to illustrate an antipattern, I don't know how the instructor could recommend having separate classes.