Question: Write a C++ program, in space given below, that implements following functionality: a) Asks user the number of students in class and creates a dynamic

Write a C++ program, in space given below, that implements following functionality:
a) Asks user the number of students in class and creates a dynamic array of doubles of that size.
b) Asks user each student's grade (range is 1-100) and stores in array created in step 1.
c) Calculates average of class.
d) Stores the information in a file named "class_grades.dat" - all grades on first line separated by spaces and average on the second line.
e) Reads from the file and displays class average only (You must read from file).
f) Handles any potential exceptions e.g. unable to create or read file.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is a possible implementation of the requested program in C include include include using namesp... 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 Programming Questions!