Review all of the code associated with the SRS as produced in this chapter, and cite all cases where error handling could be improved.
Use the test scaffold provided in the CourseCatalog class to test the ParseData and ParseData2 methods of that class against all of the following error situations in either the CourseCatalog.dat or Prerequisites.dat files (edit these files to introduce the following problems one by one, and then run the code to see what happens):
The course name is missing from one of the records in CourseCatalog.dat (i.e., the record only contains two fields instead of three).
The value for credits (third field in a record) in CourseCatalog.dat is a nonnumeric value, such as "X".
The Prerequisites.dat file refers to a course that wasn't defined in the CourseCatalog.dat file.
The Prerequisites.dat file is empty.
The Prerequisites.dat file contains a record with only one field in it. Describe what happens in each case, and discuss what coding changes you'd have to make, if any, to handle each of the preceding situations "gracefully."
Follow up exercise 2 by actually making the necessary changes to the CourseCatalog.cs file, and then retest. (Hint: This will involve exception handling.)