Test yourself: run through the following list of OO terms—some formal, some informal—and see if you can define each in your own words without referring back to the text:
Accessor (of a property)
Object (in the software sense)
Root (of a class hierarchy)
Set (as a collection type)
Sorted ordered list
Which attributes, belonging to which SRS classes, might be well suited to being declared as static?
Which attributes, belonging to which Prescription Tracking System classes (as described in Appendix B), might be well suited to being declared as static?
It has been argued that the ability to declare and implement interfaces in the C# language eliminates the need for multiple inheritance support. Do you agree or disagree? Why? Can you think of any ways in which implementing multiple interfaces "falls short" as compared with true multiple inheritance?
The following client code scenarios would each cause compilation errors—can you explain why this is so in each case? Be as precise as possible as to the reasons—they may not be as obvious as first meets the eye!
Assume that Professor and Student are both classes that implement the ITeacher interface.
Professor p; Student s = new Student(); ITeacher t; t = s; p = t;
Professor p = new Professor(); Student s; ITeacher t = new Student(); s = t;
Professor p = new Professor(); Student s = new Student(); ITeacher t; p = t;