Storing Student Grades in a Two-Dimensional array in Class GradeBook
Figure 7.21 shows the output that summarizes 10 students grades on three exams. We store the grades as a two-dimensional
array in an object of the next version of class
GradeBook Figures 7.22–7.23. Each row of the
array represents a single student’s grades for the entire course, and each column represents all the grades the students earned for one particular exam. A client program, such as Fig. 7.24, passes the
array as an argument to the
GradeBook constructor. Since there are 10 students and three exams, we use a ten-by-three
array to store the grades.
Welcome to the grade book forCS101 Introduction to C++ Programming!The grades are: Test ...