October 2008
Beginner to intermediate
680 pages
16h 48m
English
Having encapsulated so much functionality into the Student, ScheduleOfCourses, CourseCatalog, and Faculty classes allows us to dramatically simplify the Main method for the SRS "driver" class; let's revisit that class to see how it should be changed to accommodate all that we've done in this chapter.
The first part of the method creates CourseCatalog, ScheduleOfClasses, and Faculty objects in a process identical to what was done in the "test scaffolding" Main methods of the individual classes. The order that the objects are created is important, because a ScheduleOfClasses object needs a reference to a CourseCatalog, and a Faculty object needs a reference to a ScheduleOfClasses.
// Create CourseCatalog, ScheduleOfClasses, ...
Read now
Unlock full access