Question: Programming Assignment ( cpp The Get - Rich - Quick Weight Loss Center awards a prize annually to the client who has lost the most

Programming Assignment (cpp
The Get-Rich-Quick Weight Loss Center awards a prize annually to the client who has lost the most weight. The record of each client contains the following information:
name
"before" weight in pounds
"after" weight in pounds
You are to write a program that finds the client who has lost the most weight this past year, and who will therefore be awarded the prize. Also find the client who has lost the least weight. You may assume that nobody has actually gained weight, and that there are no ties. Read client data without assuming a fixed number of clients (use a sentinel value to end the input data). Use the following 3 datasets to test your program.
Data Set #1
Name Tom Mike Jenny Ryan Mason Joan Wendy
Before 210205190175177165183
After 145178190150160143169
Data Set #2
Name Leon Kevin Kay Irene Mason Abby Bill Sophie Kelly Lily
Before 173201153144198164196130153160
After 168175132125151146175109140142
Data Set #3
Name Jonson Lee Jennifer Keen Leon Tina Donna Tommy Dora Cindy Neo
Before 185179141230165125114176165135184
After 17317613217813410198162130110160
THE FOLLOWING INSTRUCTIONS MAY BE HELPFUL IF YOU ARE HAVING TROUBLE WITH THIS ASSIGNMENT.
Do your assignment in the following stages:
A. HW A - Write a program that will read client data; compute the weight loss for each client; and output the maximum weight lost.
B. HW B - Modify program A. In addition to displaying the maximum weight loss over all clients, also output the name of the client who lost the most weight and print a message of congratulations to the winner. Use the class library.
C. HW C - Modify program B. Also display the name of the client who lost the least weight, and print an appropriate comforting message.
Programming Assignment ( cpp The Get - Rich -

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