October 2008
Beginner to intermediate
680 pages
16h 48m
English
There is only one minor change to be made to the Course class from the way that it was presented in Chapter 14, to accommodate our new file persistence scheme.
Because we're now reading in a predetermined section number from the SoC_SP2009.dat file, we must modify the ScheduleSection method of the Course class so that it no longer automatically assigns a "one-up" section number to each Section.
Here is the original code for the ScheduleSection method from Chapter 14; the highlighted code shows that we were automatically determining how many sections had already been created and stored in the offeredAsSection collection (a field of Course), and bumping that up by one to create a section number on the fly:
public Section ...
Read now
Unlock full access