Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need a C++ programming code on this images(PA5) sent. this is the second page meanwhile, the first page was sent earlier before this. Thanks
I need a C++ programming code on this images(PA5) sent. this is the second page meanwhile, the first page was sent earlier before this. Thanks I need a C++ programming code on this images(PA5) sent. this is the second page meanwhile, the first page was sent earlier before this. Thanks
Page 2 of 2 The main function should repeatedly call the following two functions, allowing entry of multiple sets of data using an event controlled loop that asks the user to give a yes or no answer as to whether or not they would like to enter a set of student test scores for averaging. Call your readChar function to get user's response. 5. getStudentAverage function Code a void function that uses two reference parameters to return a name of type string& and an average of type double& to the calling environment. This function will: - Prompt for and get the student's name by calling the string class getline function. - Prompt for and get the four test scores for the student by calling the readint function for each test score and storing each in a local variable - will need four local variables. A valid - test score will be in the range 0 to 100. - Pass the four test scores to the min function to find and return the minimum score. - Calculate the total of the highest three test scores. - Call the average function to calculate the average of those three scores. - Return the student's name and the test average to the calling environment (main in this case). 6. displayStudentAverage function Code a void function to display information to the screen. This function should receive as value parameters the student's name and average and display those values to the screen along with identifying text. Display the average with one decimal digit of precision. Run an adequate set of test data and have another student examine your program prior to demonstrating to instructor and submitting for grading. Don't forget to submit the Hierarchy Chart! Scanned with CamScanner Page 2 of 2 The main function should repeatedly call the following two functions, allowing entry of multiple sets of data using an event controlled loop that asks the user to give a yes or no answer as to whether or not they would like to enter a set of student test scores for averaging. Call your readChar function to get user's response. 5. getStudentAverage function Code a void function that uses two reference parameters to return a name of type string& and an average of type double& to the calling environment. This function will: - Prompt for and get the student's name by calling the string class getline function. - Prompt for and get the four test scores for the student by calling the readint function for each test score and storing each in a local variable - will need four local variables. A valid - test score will be in the range 0 to 100. - Pass the four test scores to the min function to find and return the minimum score. - Calculate the total of the highest three test scores. - Call the average function to calculate the average of those three scores. - Return the student's name and the test average to the calling environment (main in this case). 6. displayStudentAverage function Code a void function to display information to the screen. This function should receive as value parameters the student's name and average and display those values to the screen along with identifying text. Display the average with one decimal digit of precision. Run an adequate set of test data and have another student examine your program prior to demonstrating to instructor and submitting for grading. Don't forget to submit the Hierarchy Chart! Scanned with CamScannerStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started