subject

For this Assignment you will attach ONE file, your program file (the .cpp file). DO NOT cut and paste your code into the Add Comments section of the Assignment or email your program, your program will NOT be graded and you will receive a zero for the assignment. If program does not compile you will automatically lose -10.
PROBLEM: Hospital Baby Weights. (20 pts)
Write a program that allows you to enter five baby weights. Your program will determine which baby’s weight was the lowest, which was the highest and what the average baby’s weight was. Your program MUST validate the baby’s weight (see Input Validation below). If there is a Tie for the lowest birth or highest birth weight then display a message saying that there is no lowest or highest for Today.
Input Validation: The program must check to see if the user enters a valid baby weight. A number greater than zero must be entered. If the user does not enter a valid value, display an error message and continue to ask the user to enter the value again until a valid value is entered.
SAMPLE OUTPUT:
COP2000 HOMEWORK ASSIGNMENT 5B 1
Homework Assignment 5 Pool
PSEUDO-CODE for main function:
Declare and Initialize Variables to Store Baby Weights and Average
Call welcome() to display the program description
Call getBabyWeight () for baby1
Call getBabyWeight () for baby2
Call getBabyWeight () for baby3
Call getBabyWeight () for baby4
COP2000 HOMEWORK ASSIGNMENT 5B 2
Homework Assignment 5 Pool
Call getBabyWeight () for baby5
Call findLowest (baby1, baby2, baby3, baby4, baby5)
Call findHighest(baby1, baby2, baby3, baby4, baby5)
Call weightAverage (baby1, baby2, baby3, baby4, baby5) - Don't forget to capture the
returned value
Output the Average Baby Weight
CONSTRAINTS:
NO GLOBAL VARIABLES ALLOWED. (Automatic -10)
You must use: int main()
No Arrays or Vectors
The program must use local variables. (2 pts)
All functions MUST be called by main. (3 pts)
Output must be formatted properly and correct. (3 pts)
Include a comment at the beginning of the program stating the purpose of the program,
your name, the date, and your class (1pt is for code organization and use of whitespace).
(3 pts)
This program MUST use the following functions: (9 pts)
NAME YOUR FUNCTIONS AS SHOWN BELOW (- 10 if not named correctly ):
void getBabyWeight(double &) - (2 pts) is passed the weight of the baby by reference. This function must ask the user for the baby’s weight. You must validate the input for baby’s weight (See Input Validation above). This function returns no value.
void findLowest (double, double , double , double, double) - (2 pts) is passed the five baby weights and finds the lowest weight and displays this value. The output must be formatted properly.
void findHighest (double, double , double , double, double) - (2 pts) is passed the five baby’s weights and finds the highest weight and displays this value. The output must be formatted properly.
void welcome() - (1 pts) is NOT passed any values and returns no value. This function outputs a description of the program and the developer's name (i. e. YOUR name). Your function MUST display the following text and fill in your name as the developer's name (i. e. replace "PUT YOUR NAME HERE" with your name).
COP2000 HOMEWORK ASSIGNMENT 5B 3
Homework Assignment 5 Pool
BABY WEIGHT PROGRAM
Please Enter the Five Baby Weights
Please enter a real number Weights (Must be > 0).
Program Developed by: "PUT YOUR NAME HERE"
double weightAverage(double , double , double, double, double) - (2 pts) The five baby weights are passed to this function and the function averages the weights, the average calculation is then RETURNED to main. The average result is then OUPUT in the mainfunction.
WRITE THE PROGRAM:
Write the program according to your Algorithm or Pseudo Code for the Problem above. CHECK THE PROGRAM:
Does the program meet the Constraints stated above?
Is the program displaying the correct output?
Is the program formatted correctly?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
What are the most likely causes of conflict at the meeting? check all that apply.
Answers: 1
question
Computers and Technology, 23.06.2019 09:10
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. a company is currently focusing on creating specific management goals for itself. which level of maturity is the company demonstrating under the sse_ccm framework? a. performed informally b. planned and tracked c. quantitatively controlled d. well-defined e. continuously improving
Answers: 2
question
Computers and Technology, 24.06.2019 22:00
Aobject is used for displaying the results of a question based on stored data. a. query b. report c. table d. form
Answers: 2
You know the right answer?
For this Assignment you will attach ONE file, your program file (the .cpp file). DO NOT cut and past...
Questions
question
Mathematics, 12.11.2020 04:50
question
History, 12.11.2020 04:50
question
Mathematics, 12.11.2020 04:50
Questions on the website: 13722363