Question: Write a C++ program that uses a structure to store the following data for each student: Member Name Description -------------------------------------------------------------------------- 1. name Student name 2.

Write a C++ program that uses a structure to store the following data for each student:

Member Name Description

--------------------------------------------------------------------------

1. name Student name

2. IDnum Student ID number

3. Test[3] Pointer to an array of test scores

4. average Average of test scores

5. grade Course letter grade (A, B, C, D, or F)

The program should keep 3 test scores for a group of students. It should ask the user how many students there are. It should then dynamically allocate an array of structures.

After the student array have been dynamically allocated, the program should ask for the ID number and the test scores for each student. The average test score should be calculated and stored in the average member of each structure. The course grade should be computed on the basis of the following grading scale

A 90-100

B 80 – 89

C 70 – 79

D 60 – 69

F below 60

The course grade should then be stored in the grade member for each structure. Once all this data is calculated, a table should be display on the screen listing each student's name, ID number, test scores, average test score and course grade.

Input validation:

• all the data for each student is entered

• Do not accept negative numbers for any test score.

An example of program output:

Input student data...

How many students: 2

Enter information for student 1

Student name: George Brown

Student ID number: 123

Enter 3 test scores:

test score 1: 87

test score 2: 95

test score 3: 79

Enter information for student 2

Student name: Nancy Smith

Student ID number: 215

Enter 3 test scores:

test score 1: 89

test score 2: 88

test score 3: 95
*** REPORT ****

NAME ID TEST SCORES AVERAGE Grade

---------------------- ------ --------------------- ---------------- ----------

George Brown 123 87 95 79 87.00 B

Nancy Smith    215 89 88 95 90.67 A

Step by Step Solution

3.35 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

There are various ways to solve this problem We can use cla... View full answer

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