Answer:

Starting the Program

Here is a class definition for Goods:

class Goods
{
  String description;
  double price;

  Goods( String des, double pr )
  {
    description = des;
    price       = pr;
  }

  void display()
  {
    System.out.println( "item: " + description +  " price: " + price );
  }
}

Here is a skeleton of the class Food, a child of Goods. It adds the variable calories.

class Food 
{
  double calories;

  Food( String des, double pr, double cal)
  {
    super( , );
    calories =  ;
  }

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

QUESTION 8:

Fill in the blanks. Click here for a