A good answer might be:


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. Recall that 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 7:

Fill in the blanks. Click here for a