go to previous page   go to home page   go to next page

Answer:

interface Taxable
{
  final double taxRate = 0.06 ;
  double calculateTax() ;
}

Adding another Class

taxRate is a constant. It must be set to a value. Here is a partial definition of Toy. Recall that it:

class Toy extends Goods  
{
  int minimumAge;

  Toy( String des, double pr, int min)
  {
    super( des, pr );
    minimumAge  = min ;
  }

  void display()
  {
    super.display() ;
    System.out.println( "minimum age: " + minimumAge );
  }

  public double   // implement a method in the interface
  {
    return price *  ;
  }
}

QUESTION 11:

Fill in the blanks. Click here for a