Write a function to compute the average amount of food


This program is in c++ how could I make the following changes?

Modify, do not rewrite, source.txt. In general, make the program as scalable as possible. "scalable"?, for this program, means that one can change the number of monkeys or changing the number of days the monkey are fed by changing the data file and one or two global constants.

1. Do not use any global variables. Global constants are ok.

2. Remove all 1D arrays from the program

3. Increase the number of monkeys from 3 to 32

4. Feed the monkey 7 days a week instead of 5

5. Use 2D arrays almost everywhere

6. Use 2D array parameters almost everywhere

7. Write a function to compute the average amount of food eaten per day by the whole family of monkeys; write a function to compute the least amount of food eaten by any monkey; write a function to compute the most amount of food eaten by any monkey.

8. Read the monkey data from a file rather than interactively. Your file will contain 32 x 7 = 224 integers. Write a function to read the data from a file. Make sure the data is good. Define sensible upper and lower bounds for monkey daily monkey food consumption.

Attachment:- Source.txt

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a function to compute the average amount of food
Reference No:- TGS01361649

Expected delivery within 24 Hours