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 05:00
This program will store roster and rating information for a soccer team. coaches rate players during tryouts to ensure a balanced team. (1) prompt the user to input five pairs of numbers: a player's jersey number (0 - 99) and the player's rating (1 - 9). store the jersey numbers in one int vector and the ratings in another int vector. output these vectors (i.e., output the roster). (3 pts) ex: enter player 1's jersey number: 84 enter player 1's rating: 7 enter player 2's jersey number: 23 enter player 2's rating: 4 enter player 3's jersey number: 4 enter player 3's rating: 5 enter player 4's jersey number: 30 enter player 4's rating: 2
Answers: 1
question
Computers and Technology, 22.06.2019 12:40
In a response of approximately 50 words, explain why it would be essential for the successful a/v technician to participate in additional coursework, presentations and seminars offered by equipment manufacturers as well as annual conferences attended by colleagues in the industry.
Answers: 1
question
Computers and Technology, 23.06.2019 04:10
2pointswho was mikhail gorbachev? oa. a russian leader who opposed a coupob. a polish leader who founded the labor union "solidarityoc. a soviet leader who called for a closer relationship with the unitedstates, economic reform, and a more open societyd. a soviet leader who called for more oppression in the soviet union
Answers: 3
question
Computers and Technology, 24.06.2019 04:30
How do you share someone else’s tweet with your own twitter followers?
Answers: 1
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
Physics, 22.11.2020 17:30
question
English, 22.11.2020 17:30
question
English, 22.11.2020 17:30
question
Mathematics, 22.11.2020 17:30
Questions on the website: 13722361