Write a function to compute the average amount of food eaten

Assignment Help C/C++ Programming
Reference no: EM131014657

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

Reference no: EM131014657

Questions Cloud

Data calculate the after-tax cash flow : Given the following data calculate the after-tax cash flow. Sales $389,000, cost of goods sold $200,000, taxes $108,000, interest $45,000, operating expenses $67,000, depreciation $50,000, net income $39,000.
Dividends are expected to grow-hat is current share price : Synovec Co. is growing quickly. Dividends are expected to grow at a rate of 24 percent for the next three years, with the growth rate falling off to a constant 7 percent thereafter. If the required return is 11 percent, and the company just paid a di..
Jacobi company balance sheet was the following shareholders : Total contributed capital, retained earnings, and accumulated other comprehensive income xxxxx
Write a function that models the total population : Write a function that models the total population for the years shown in the bar graph - Does the result in part (b) overestimate or underestimate the actual total population in 2005 shown by the bar graph? By how much?
Write a function to compute the average amount of food eaten : 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.
Business in a culture that was opposite : 1. If you were planning to do business in a culture that was opposite from your own on the cultural dimensions of "power distance" and "individualism/ collectivism," what challenges would you expect to face? How would you prepare?
Information about business ethics : Imagine that someone from another culture asked you to provide information about business ethics when dealing with American managers. What would you say?
Find probability that supply chain broken in event : Consider the relief supply chain infrastructure for a main island in the event of flood disaster illustrated by Figure. Suppose that the probabilities that links 1 and 2 are destroyed in the event of a flood are 0.03 and 0.07, respectively. Find t..
How you would go about the entire sequence of systems design : You are asked to design a pedestrian footbridge over a busy street in a city's downtown area. What are some of the structural engineering considerations that need to be taken into account during the design of this system?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd