Calories and Fat Calculator

Good programming style:

  1. Header (Description, author’s name, date, and java version)
  2. Imports if any.
  3. Driver or tester class.
  4. The program should have a proper exit with a message.
  5. Input/output included as a paragraph comment.

The following description of this assignment can be modified to suit the requirements: it should use at least an ArrayList, it should be object-oriented, and have good programming practices. 

Write a java program, FoodChart.java, and FoodChartTest.java to provide calories and fat content in a selected number of foods.
– Choose 4 different categories of foods from the link attached to the image or any other resource you might want to use.
– Write a function for each of the categories with at least 5 food choices.
– Display a menu and prompt the user for choices.
– Once the user is finished selecting, display the number of calories and the fat content.

Example:

1. Meats
2. Grains
3. Vegetables
4. Fruit

Choose a category: 2

1. Rice, brown long-grain  Fat: 1.8 grams Calories: 216
2. Pasta, whole wheat      Fat: 1 gram    Calories: 214
3. Pasta, corn             Fat: 1.5 grams Calories: 210
4. Pasta, Quinoa           Fat: 0 grams   Calories: 200
5. Pasta, Soba (buckwheat) Fat: 1.5 grams Calories: 190
Choose the food: 4

Do you want to continue? y/n

if the answer is not:
   The total gram of fat is ... and the calories are ...
   Would you like to start again? y/n
else
    
1. Meats
2. Grains
3. Vegetables
4. Fruit

Choose a category:

Required submission:

  1. A short video.
  2. Copy and paste both programs.
  3. Submit the zipped project.