?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Easy

Characteristics of an Abstract Class

APCSA-VXYEBK

Of the following, which is the BEST explanation of when to use an abstract class instead of an interface or normal class?

A

Use an abstract class if the class needs to implement an interface.

B

Use an abstract class if its subclasses need to redefine certain methods, but there are some methods that have the same functionality in all the subclasses.

C

Use an abstract class if the class has no subclasses.

D

Use an abstract class if its subclasses use all the methods in the abstract class the way they are already defined in the abstract class.

E

Use an abstract class if its subclasses need to redefine all its methods, and there are no methods that have the same functionality in any the subclasses.