Java Reference
In-Depth Information
PROGRAMMING EXAMPLE: Grade Report
This programming example further illustrates the concepts of inheritance and
composition.
The midsemester point at your college or university is approaching. The registrar's
office wants to prepare the grade reports as soon as the students' grades are recorded.
Some of the enrolled students have not yet paid their tuition, however.
If a student has paid the tuition, the student's grades are shown on the grade report
with the grade-point average (GPA).
If a student has not paid the tuition, the grades are not printed. For these students, the
grade report contains a message indicating that the grades are being held for non-
payment of tuition. The grade report also shows the billing amount.
The registrar's office and the business office want you to help write a program that
can analyze the students' data and print the appropriate grade reports.
The program is divided into two parts. In the first part, we create the application
program that generates the grade report in the window's console environment and
stores the output in a file.
In the second part, which is available in the Additional Student Files folder at
www.cengagebrain.com., we create a GUI to display the students' grade reports, as
shown in the section Student Grade Report: GUI Design.
For this report, the data is stored in a file in the following form:
PART I:
STUDENT
GRADE
REPORT:
CONSOLE
DISPLAY
noOfStudents tuitionRate
studentName studentID isTuitionPaid numberOfCourses
courseName courseNumber creditHours grade
courseName courseNumber creditHours grade
.
.
.
studentName studentID isTuitionPaid numberOfCourses
courseName courseNumber creditHours grade
courseName courseNumber creditHours grade
.
.
.
The first line indicates the number of students enrolled and the tuition rate per credit
hour. The students' data is given thereafter.
Search WWH ::




Custom Search