COM1204, Summer 1998, Prof. Futrelle
Information/Guide for the Final Exam
to be held Thursday, Sept. 3, 8am, 245CN
Since the Midterm exam was given late in the course, there is not much additional material, so much of the Final exam will again cover material that was on the Midterm. (You get a second chance!) So you should continue to study the material you studied for the Midterm with the addition of one major new topic, Inheritance, which will be on the Final exam. Again, the Final exam will be closed book, closed notes.
- Inheritance
-
- This important topic has two aspects -- the general concept, as developed in the Meyer book, and its specific implementation in C++ as discussed in the Lippman and Lajoie text. In addition, it has been used in the PS code in the definition of the Node class and Switch classes, which inherit from the Keywords class, and the Phone class, which inherits from the Node class. (The Node class was originally thought of as being the superclass of both the Phone and the Switch, but that didn't work out, so in a revised system, Node might disappear.)
-
- To study inheritance at this late date in the course, I am giving you some rather restricted readings which will give you some useful insights and details from the two textbooks. Specifically:
-
- In Meyer, Chapter 14 which introduces inheritance, is rather lengthy and complex, so focus on reading the Key Concepts, pg. 516, and pgs. 459-464. Chapter 24 is entitled "Using inheritance well", and deserves some reading too. Read the Summary on pg. 862 and the Key Concepts on pg. 863, and pgs. 809- 816 (just to the middle of 816).
-
- In Lippman and Lajoie, the basics are introduced in Chapter 17, "Class Inheritance and Subtyping". First, read the section introduction, pgs. 877-878. The chapter itself presents us with serious problems, because it comes late in their book, and they assume that we have studied a lot of the earlier material in the book. Fortunately or unfortunately, you don't actually have to know the many things they assume in Chapter 17 to understand and use inheritance. But the problem remains that the chapter is difficult to read. All I can ask you to do is to try, and I'll point out a few passages and examples in the book that are readable without a great deal of background knowledge. These include Sec. 17.1.1, pg. 885 only, Fig. 17.1 and the text following it to the end of pg. 889. Also, pg. 890. I'll also discuss some of the material in class.
-
- In the phone system code, study the definitions of the classes involved in inheritance first in the header files super.h, phone.h, and switch.h. Then study the corresponding .cp files to see how the inherited items pickup and hangup are used (pointers to static string objects in Keywords). That is the modest totality of our actual use of inheritance, though there are many additional potential uses for inheritance when the phone system is developed further in the future.