Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java Background: A nutritionist has contracted you to create a software that will help clients count calories consumed Assignment (Part 1: 75 points): The

In Java image text in transcribed
Background: A nutritionist has contracted you to create a software that will help clients count calories consumed Assignment (Part 1: 75 points): The client will provide data in the form of a text file. Each line will contain three numbers separated by spaces. The numbers represent the number of calories consumed for breakfast, lunch and dinner, respectively. You may assume that the file includes data for exactly one week (i.e., seven lines represent seven days Monday to Sunday). Your program should read the data from the file into a 2-dimensional array that has seven rows and three columns, where each row will keep record of calories consumed for all the three meals of a day. Then, compute and print out the following information a list of the total number of calories consumed each day from Monday to Sunday the average number of calories consumed each day the average number of calories (average over the week) consumed in each of the meals the maximum number of calories consumed each day . the maximum number of calories consumed in each meal type Your program must have separate methods for reading in the data and for printing each of the different quantities given above. Please do not just put all of your code into the main method Example input file: Your program must read the input from a file named inputl.txt 200 1000 800 450 845 1200 800 250 400 0 1500 1800 600 500 1000 700 1400 1700 675 400 900

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago