Question: Problem 1 : Nutrition Watcher In this assignment, you will be writing a program to check the nutrition values of a meal for Old Country

Problem 1: Nutrition Watcher In this assignment, you will be writing a program to check the nutrition values of a meal for Old Country Buffet. Old Country Buffet offers the following type of food:
Bakery
Entree
Drink
Each food has a name and label. Bakery has an extra attribute pieces, and Drink has an extra attribute volume. The calories of each serving can be determined by the following table:
Calories
All of your classes should be defined in chapter9.nutrition package. You should also implement a class named Place, which has the following methods:
addltem(Fooditem item)
display()
getTotalCalories()
Your implementation should work for PlateTest.java, and PlateTest should produce the following output(so you can figure out what to output in display method for each class):
Name:.Steak
Label:.L
Calories:400
Name:.Croissant
Label:.M
Calories:400
Pieces:.2
Name:.Sprite+
Label:.L
Calories:300
volume:.180
Name: .Bread
Label:.L
Calories:300
Pieces:.1
Name:.Ice.Teat
Label: .M+
Calories:160
Volume:.80
Total:.1560
Check the Test Cases Console on the right for more details. The test cases will show when you click on the task.
Problem 1 : Nutrition Watcher In this assignment,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!