Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Code Exercise A: Gradebook1D Write an application that prints out the final grade of the students in a class and the average for the

C++ Code

Exercise A: Gradebook1D

Write an application that prints out the final grade of the students in a class and the average for the whole class. There are a total of 3 quizzes.

You will need 4 arrays:

An array of type int to store all the ID's

An array of type double to store all scores for quiz 1

An array of type double to store all scores for quiz 2

An array of type double to store all scores for quiz 3

How to proceed:

Ask the user how many students are in the class, so you can set the length of the all arrays.

Allocate 4 arrays that will store the data.

Use a FOR loop to retrieve and store all the data.

Use another FOR loop to

Output the final score for each student.

Keep track of all scores to later compute the average for the class.

Calculate and Output the average for the class.

Format all floating-point numbers to 2 decimal places.

Sample Output:

How many students in the class? 4

Enter student ID: 111

Enter score for Quiz 1: 100

Enter score for Quiz 2: 95

Enter score for Quiz 3: 90

Enter student ID: 222

Enter score for Quiz 1: 90

Enter score for Quiz 2: 85

Enter score for Quiz 3: 80

Enter student ID: 333

Enter score for Quiz 1: 100

Enter score for Quiz 2: 100

Enter score for Quiz 3: 100

Enter student ID: 444

Enter score for Quiz 1: 90

Enter score for Quiz 2: 90

Enter score for Quiz 3: 90

ID 111 - Final grade: 95.00

ID 222 - Final grade: 85.00

ID 333 - Final grade: 100.00

ID 444 - Final grade: 90.00

Class average: 92.50

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

Distinguish among first-, second-, and third-degree bums.

Answered: 1 week ago

Question

How might mobile HR affect the various HR functions?

Answered: 1 week ago

Question

4. Does cultural aptitude impact ones emotional intelligence?

Answered: 1 week ago

Question

7. Do the organizations social activities reflect diversity?

Answered: 1 week ago