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 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.