E.10 Case Study: Class GradeBook
Using a Two-Dimensional Array
In Section E.8, we presented class GradeBook
(Fig. E.13), which used a one-dimensional array to store student grades on a single exam. In most semesters, students take several exams. Professors are likely to want to analyze grades across the entire semester, both for a single student and for the class as a whole.
Storing Student Grades in a Two-Dimensional Array in Class GradeBook
Figure E.17 contains a GradeBook
class that uses a two-dimensional array grades
to store the grades of a number of students on multiple exams. Each row of the array represents a single student’s grades for the entire course, and each column represents the grades of all the students who took a particular ...
Get Android How to Program, 3/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.