Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THE PROGRAM SHOULD BE IN C++. Write a program that asks the user to enter 5 test scores (data type = double) into an array.

THE PROGRAM SHOULD BE IN C++. Write a program that asks the user to enter 5 test scores (data type = double) into an array. The program should calculate and display: The average of the 5 test scores The largest test score stored in the array The smallest test score stored in the array. Practice using functions that you learned in Chapter 6 to make your program more modular and easier to read. Here are the function prototypes to use: // Function Prototypes void printProgramPurpose(); void getTestScores (double testScores [], int numTests); double calcAverageTestScore (double testScores [], int numTests); double getLargestTestScore (double testScores [], int numTests); double getSmallestTestScore (double testScores [], int numTests); void printResults (double averageTestScore, double largestTestScore, double smallestTestScore); Input Validation: Do not accept test scores less than 0 or greater than 100. Remember: Include several test runs of the program to show successful runs of your program, with both valid and invalid data (to show that you are checking for invalid data) Please ensure the program is well designed and follows accepted style guidelines (e.g. variable naming, indentation, spacing). Please ensure the program is well documented, including the overall purpose of the program and documenting all the major sections of the code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions