Question
Java Assignment Your doctor says you are too heavy and wants you to keep track of your daily caloric intake. Therefore, she asked you to
Java Assignment
Your doctor says you are too heavy and wants you to keep track of your daily caloric intake. Therefore, she asked you to keep track of how many calories you eat every day on each of your meals (breakfast, lunch, dinner and snacks) for a week.
Write a program that stores this information in a two dimensional 7 4 array, where each row represents a day of the week and each column represents a different meal. The program should first ask the user to input the data (calories) for each meal and day. Then it should create a report that includes the following information:
- Total caloric consumption for each day of the week.
- Average daily caloric consumption for the whole week.
- The smallest amount of calories eaten during the week in any of the meals.
- The biggest amount of calories eaten during the week in any of the meals.
Additional requirements:
1. Your class must be named CalorieTracker.
2. Create a method to obtain the user input.
3. Create methods to compute and display each of the quantities above.
4. Do not accept negative numbers for calories.
Send your code file (CalorieTracker.java)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started