Answered step by step
Verified Expert Solution
Link Copied!

Question

...
1 Approved Answer

home/study/engineering/computer science/questions and answers/ a teacher has five students who have taken four ... Question: A teacher has five students who have taken four tests.

home/study/engineering/computer science/questions and answers/ a teacher has five students who have taken four ...

Question: A teacher has five students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to a student, based on the average of his or her four test scores. Test Score Letter Grade 90-100 A 80-89 B 70-79 C 60-69 D 0-59 F Write a program that uses an array of string objects to hold the five student names, an array of five characters to hold the five students letter grades, and five arrays of four doubles to hold each students set of test scores. The program should allow the user to enter each students name and his or her four test scores. It should then calculate and display each students average test score and a letter grade based on the average. Input Validation: Do not accept test scores less than 0 or greater than 100. Define and use the following functions for this program: void inputData(string &name, double testScores[]) void calcGrade(double testScores[], char &grade, double &average) void displayData(string name, double testScores[], double average, char grade)

A teacher has five students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to a student, based on the average of his or her four test scores.

Test Score

Letter Grade

90-100

A

80-89

B

70-79

C

60-69

D

0-59

F

Write a program that uses an array of string objects to hold the five student names, an array of five characters to hold the five students letter grades, and five arrays of four doubles to hold each students set of test scores.

The program should allow the user to enter each students name and his or her four test scores. It should then calculate and display each students average test score and a letter grade based on the average.

Input Validation: Do not accept test scores less than 0 or greater than 100.

Define and use the following functions for this program:

void inputData(string &name, double testScores[])

void calcGrade(double testScores[], char &grade, double &average)

void displayData(string name, double testScores[], double average, char grade)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Accounting questions