Answer the following statements true (T) or false (F)

1. Because the subclass is more specialized than the superclass, it is sometimes necessary for the subclass to replace inadequate superclass methods with more suitable ones.
2. When a subclass overrides a superclass method, only the subclass's version of the method can be called with a subclass object.
3. Inheritance involves a subclass, which is the general class, and a superclass, which is the specialized class.
4. It is not possible for a superclass to call a subclass's method.
5. When a subclass extends a superclass, the public members of the superclass become public members of the subclass.

1. TRUE
2. TRUE
3. FALSE
4. TRUE
5. TRUE

Computer Science & Information Technology

You might also like to view...

Which expression is equivalent to if (!(grade == sentinelValue))?

a. if (grade !== sentinelValue) b. if (grade != sentinelValue) c. ! if (grade == sentinelValue) d. ! if (grade !== sentinelValue)

Computer Science & Information Technology

Gantt and PERT are types of ______ used to plan and schedule time relationships among project activities.

A. apps B. charts C. deliverables D. documents

Computer Science & Information Technology