The Completed Book Class

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.

Answer:

Yes. Any number of classes can implement the same interface.

The Completed Book Class

There is one remaining class in our example, Book, which looks like this:

  • Has a parent Goods.
  • Adds a variable author.
  • Is taxable.

You might wish to review the diagram that shows the relationships between the classes. Here is the usual blank-ridden class definition:

class Book   Goods  Taxable
{
  String  ;

  Book( String des, double pr, String auth)
  {
    super( des, pr );
      = auth ;
  }

  void display()
  {
    super.display() ;
    System.out.println( "author: " +  );
  }

  public double 
  {
    return price *  ;
  }
}

You might also wish to consult the Taxable interface.

QUESTION 13:

Rid the definitions of those nasty blanks.