Class A has a method called report() which prints itself as a formatted report. Class B is a
subclass of A. It also has the responsibility of printing itself but generates more details and
includes data specific to B. Based on good OO design principles such as encapsulation,
inheritance, and polymorphism, which of the following are appropriate?
A.
If class C is not a subclass of A, then its reporting method should be named differently to avoid
confusion among developers.
B.
Naming of B’s reporting method makes no difference to the overall design.
C.
B’s report() method should invoke A’s report() method.
D.
B’s reporting method should be named report().
E.
B’s reporting method should be named reportDetails() so that requesting classes can easily
distinguish which method they are invoking.