Question: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CalorieCounter { class Program { const int DAYS_IN_WEEK = 7; const int MEALS_IN_DAY =

 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CalorieCounter { class Program { const int DAYS_IN_WEEK = 7; const int MEALS_IN_DAY = 3; static string[] DaysOfWeek = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; static string[] MealsOfDay = { "Breakfast", "Lunch", "Dinner" }; static void Main(string[] args) { int[,] calories = {{900, 750, 1020 }, {300, 1000, 2700 }, {500, 700, 2100 }, {400, 900, 1780 }, {600, 1200, 1100}, {575, 1150, 1900 }, {600, 1020, 1700 } }; double[] dailyAverage = new double [DAYS_IN_WEEK]; double[] mealAverage = new double[MEALS_IN_DAY]; Welcome(); dailyAverage = CalculateAverageByDay(calories); mealAverage = CalculateAverageByMeal(calories); DisplayDailyAverage(dailyAverage); DisplayMealAverage(mealAverage); DisplayAverageCaloriesPerMeal(calories); ExitProgram(); }//end Main static double [] CalculateAverageByDay(int[,] calories) { int totalByDay = 0; double [] dailyAverage = new double[DAYS_IN_WEEK]; for(int row = 0; row   Using C# you are asked to complete the provided CaloreCounter program. This program reads from a two-dimensional array showing the calories consumed during various meals throughout the week and presents some statistics and tables from this data. You are to complete these three methods to get the program working . CalculateAverageByMeal) DisplayMealAverage( . DisplayAverageCaloriesPerMeal( When these three methods have been completed, your program should produce the following output: Welcome to Calorie Counter Daily Averages Monday Tuesday Wednesday Thursday Friday Saturday Sunday 890 :1.333 1.100 :1,027 967 1.208 : 1.107 Breakfast Lunch Dinner Average per Meal 554 960 1.757 Average calories 1,090 Press enter to exit ...- Make sure that you display the results in the same format as the above image so that 1000.809 displays as 1,000. This can be done using the formatting methods previously introduced with the N format specifier (an example is provided in the sample code) While the provided program does contain a Main() method, this is for your convenience in developing and testing your functions. The test will call your CalculateAverageByMeal(), DisplayMealAverage() and DisplayAverageCaloriesPerMeal() methods directly, which means they must be public Sample code

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 Databases Questions!