Which approach correctly implements these goals?

You are asked to create code that defines a Beverage, and includes method implementation code
for some beverage behaviors. Beverage subtypes will be required to provide implementations of
some, but not all, of the methods defined in Beverage.
Which approach correctly implements these goals?

You are asked to create code that defines a Beverage, and includes method implementation code
for some beverage behaviors. Beverage subtypes will be required to provide implementations of
some, but not all, of the methods defined in Beverage.
Which approach correctly implements these goals?

A.
Create an abstract Beverage class that defines only abstract methods.

B.
Create a Beverage interface that all beverage subtypes must implement.

C.
Create an abstract Beverage class that defines both abstract and concrete methods.

D.
Create a concrete Beverage class that defines both abstract and concrete methods.



Leave a Reply 0

Your email address will not be published. Required fields are marked *