Super and sub classes

A sub class that you have defined cannot be used in place of its super class. You find that the super-class has a method that accepts a super-class type parameter.

Which of the following choices is/are TRUE about the sub class?

Options
  1. The sub class should accept as argument a super-class type only
  2. The sub class should accept as argument a sub-class type only
  3. The sub class should accept as argument a sub-class type or super class type
  4. The sub class method should not have any argument

Related Posts

Close Bitnami banner
Bitnami