15.5. CourseCatalog

We'll start with the CourseCatalog class. This is a new class to the SRS implementation that stores Course object references in a Dictionary collection using the course numbers as the keys. In addition to the Dictionary, the CourseCatalog class maintains two string data elements that contain the names of the files that store the course catalog and course prerequisite data. The three data elements are implemented using auto-implemented properties.

using System; using System.Collections.Generic; using System.IO; public class CourseCatalog { //------------------------------- // Auto-implemented properties. //------------------------------- public string CourseCatalogFile { get; set; } public string PrerequisitesFile { get; set; ...

Get Beginning C# 2008 Objects: From Concept to Code now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.