A good answer might be:

Concept Parent Class
Child Class
or Interface?
Goods Parent Class
Food Child Class
Toy Child Class
Book Child Class
Taxable Interface

Picture of the Classes

Here is a picture that shows the classes and the interface. The children classes extend their parent. This is shown with a solid arrow pointing at the parent.

The solid arrows show inheritance. The three children inherit the display() method.

Two of the classes implement the interface. This is shown with a dotted arrow pointing at the interface.

The dotted arrow show what a class must implement. The Toy and Book classes must implement the calculateTax() method.


QUESTION 6:

According to the picture,

  • What method(s) will Food have?
  • What method(s) will Toy have?

Click Here after you have answered the question