Yes. Any number of classes can implement the same interface.
There is one remaining class in our example, Book
, which looks like this:
Goods
.author
.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 wish to consult the Taxable interface.