Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 Press any key to continue . . .

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

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

Students also viewed these Databases questions

Question

Create a workflow analysis.

Answered: 1 week ago