stim Technique University Proffessor is teaching two courses, namely CENG103 and CENG104. For each course registration quota is maximum 25 students. At the end of the semester, both courses final grades are written in the same sequential access file, namely CE103-104.txt. The format of sequential file is given below. The program will read the CE103-104.txt file and for each course, the average of the final exam grades will be calculated, highest score and lowest score will be found. Your program will define related objects for each course. These operations will be performed by the related course objects' member functions. The class interface file and member functions implementations of the class will be located in separate files. Hint:  Use the sample program files given in the class studies. Sample CE103-104.txt sequential file format:  StdID courseCode  grade

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 20SA
icon
Related questions
Question

 

It will be written in C ++ language.

Ostim Technique University Proffessor is teaching two courses, namely CENG103 and CENG104. For each course registration quota is maximum 25 students. At the end of the semester, both courses final grades are written in the same sequential access file, namely CE103-104.txt. The format of sequential file is given below.

The program will read the CE103-104.txt file and for each course, the average of the final exam grades will be calculated, highest score and lowest score will be found. Your program will define related objects for each course. These operations will be performed by the related course objects' member functions. The class interface file and member functions implementations of the class will be located in separate files.

Hint:  Use the sample program files given in the class studies.

Sample CE103-104.txt sequential file format:

 StdID courseCode  grade

1111  CENG103  78

1111  CENG104  66

3333  CENG103  99

4444  CENG104  63

9999  CENG104  59

1234  CENG103  77

4567  CENG103  88

7778  CENG104  97

5555  CENG103  55

3333  CENG104  88

4444  CENG103  76 

 

//GradeBook.h interface File

using namespace std;

class GradeBook

{

public:

               static const int students = 25;

               GradeBook(string, int stNo[], const int []);

              

               void setCourseName(string);

               string getCourseName();

               void displayMessage();

               void processGrades();

               int getMinimum();

               int getMaximum();

               double getAverage();

               void outputGrades();

private:

               string courseName;

               int grades[students];

               int stdNo[students];

}; 

Reading the grades from CE103-104.txt
The grade book for : CENG103 Introduction to C Programming
The Grades Are :
Student
Student
Student
Student
Student
Student
total = 473.00, count = 6
Class average is 78.83
Lowest grade is 55
Highest grade is 99
1: 1111
78
2: 3333
99
3: 1234
77
4: 4567
88
5: 5555
55
6: 4444
76
The grade book for : CENG104 Introduction to C++
The Grades Are :
Student
Student
Student
Student
Student
1: 1111
66
2: 4444
63
3: 9999
59
4: 7778
97
5: 3333
88
total = 373.00, count = 5
Class average is 74.60
Lowest grade is 59
Highest grade is 97
Transcribed Image Text:Reading the grades from CE103-104.txt The grade book for : CENG103 Introduction to C Programming The Grades Are : Student Student Student Student Student Student total = 473.00, count = 6 Class average is 78.83 Lowest grade is 55 Highest grade is 99 1: 1111 78 2: 3333 99 3: 1234 77 4: 4567 88 5: 5555 55 6: 4444 76 The grade book for : CENG104 Introduction to C++ The Grades Are : Student Student Student Student Student 1: 1111 66 2: 4444 63 3: 9999 59 4: 7778 97 5: 3333 88 total = 373.00, count = 5 Class average is 74.60 Lowest grade is 59 Highest grade is 97
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage