Known Typos, Errors and Bugs in ``An Introduction to Object Oriented Programming'' By Tim Budd published by Addison-Welsey, 1991. Last Updated January 10, 1994. ---------------------------------------------- page 5, line 26, ``from'' should be ``form'' page 11, line 19, ``repeatly'' should be ``repeatedly'' page 20, line 13, ``resuable'' should be ``reusable''. page 23, line 6, also page 57 line 16, ``principle'' should be ``principal'' page 41, figure caption should be: data values maintained by class CardView page 47, lines 6 and 7 of Figure 3.11. Assignments of up, x and y should be removed, as these are instance variables in class CardView, not in class Card. page 51, line 10 of Figure 3.15. Assignment of variable ``up'' should be removed, as this is an instance variable in class CardView, not in class Card. page 52, line 17. should read ``the first time the file card.h is included'' page 53, method ``setSuitAndCount'' should be ``setSuitAndRank'' (see remarks conerning page 64, below). page 53, constants cannot now be initialized using the syntax shown in class CardView. Constants must be initialized by a constructor, but I haven't introduced these at this point in the book. Only thing to do is make the constants global. page 55, method color should use ``s'' directly, so that comment on page 59 makes sense. page 57. Add a new section for ``message passing versus procedure call'' emphasize difference is one of binding time, designated receiver. page 59, line 11, Figure 3.18, page 55 should be Figure 3.16, page 53 Page 60, near bottom, == tests should all be = (actually either works, but should be consistent with figure 3.13) page 63, line 5 of Figure 4.2. ``dispose c'' should be ``delete c''. page 63, line 4 of text. should read: This routine is called dispose in Object Pascal and delete in C++, page 64, line -19 (19 from bottom) instance variable ``count'' should be ``rank'' similar error occurs on pages: page 64, line -7 page 66, line -10 page 73, problems 1 and 2 (also ``setSuitAndcount'' should be ``setSuitAndRank'') page 67, lines 19 and 20. Two semicolons should be inserted to break up the sentence. ``will be 0; if the user .. will still be 0; and if the user'' page 69. put ``private:'' after curly brace in class Mark (strictly speaking not necessary, but consistent) page 71, line -13 by a semicolon => by semicolons page 72. \\ (twice) in figure near bottom should be removed. page 72. ``As we will see in Chapter 7.'' (haven't seen chapter 7 yet). page 84. Exercise 2. Several places ``m N'' appears, should simply be ``N''. page 89. Add the following sentence to paragraph one. ``If we are allowed to change at run-time the meaning of the low-level functions (as we can using message passing), then the *same code* can be used for all these high-level functions.'' page 90. This section (6.3) should probably be revised to include comments on the use of inheritance as a specification technique versus the use of inheritance as an implementation technique. Limitation makes sense in the one, for example, and not the other. page 98, 4 lines from bottom. The discussion in this section leaves it unclear which technique is which. Add the following sentence to the second to the last paragraph: ``Using the categories described earlier in this chapter, this is subclassing for construction.'' page 99, line 9. ``Chapter 4, section 5.3'' should be changed to ``Chapter 4, page 72''. [ Explanation - third order headings had their numbers removed rather late in the manuscript development process. Note to compositor - changing a \ref to a \pageref should take care of this ] page 100, figure caption. ``construction'' should be ``composition''. page 105, 11 lines from bottom. Add ``To phrase the question more generally, does a value know its own type?'' page 106, starting 8 lines from bottom. The two sentences beginning ``We will not describe the...'' should be removed, and the paragraph break between the remaining sentence and the next paragraph should be removed. [ explanation: chapter 7 was originally earlier in the book, these comments became unnecessary after it was moved, but were not caught.] page 111, line 13. ``bestatically'' should be ``be statically'' (two words). page 112, line 15. Remove the sentence ``We will describe the meaning ..'' page 117, line 13, should begin with an up arrow. page 125, 126, 130. Code should be replaced by new code (see note on page 135). page 130, 8 lines from botton ``noarguments'' should be ``no arguments'' page 135. The solitare example has been modifed to now use the data structures developed in chapter 17. Thus the class CardLink has disappeared. In the next edition of the book the development will be updated to reflect this. (Both the old and new versions of the code can be obtained from the mail server). page 141, line 8 of figure, CardDeck => CardPile page 146, figure caption - should be method ``draw'', not ``display''. page 153. To be consistent the displayed line X = *Y should be lower case. page 155, line -11, overlayed => overlaid page 158, line 20 ``assigning to a class object'' should be ``to an object'' page 159, line 15, arguments => formal parameters page 160, line 5 of Figure 11.8 should read ``class Derived : public Base { '' page 160, line 6 of text, X and Y should be lower case. page 161, line 11 comment should be /* */ form, not // page 164, line -8. This discussion is in error. The overloading rules are actually more complex. First the system will find the closest surrounding context which contains an operator definition, then it will try to disambiguate the operator. So the use of b == a would generate an error, as there is no associated definition in class B. page 166. I would like to add discussion of the following trick, which can be used to combine class tests and avoid casts. class Base { virtual Derived * isDerived() { return 0; } }; class Derived { virtual Derived * isDerived() { return this; } }; using the virtual method isDerived can then be used to tell if an object is an instance of the derived class, and if it is to convert it to a legal pointer to the derived class. page 167, line -3, extraneous period after 11.1 page 181, should have public in the class declaration (default is private) class A : virtual public D { class B : virtual public D { no reason for blank line on line 9, and on line 17 curly brace should move to previous line for sake on consistency. page 181, second paragram. It is no longer possible to control the order of initialization by ordering the initializers in the constructor. This discussion is in error. page 191, line -11, section 5.3=>Section 4.3 page 223. If new code is included (see note on page 135) then the CardPile example is no longer appropriate. Replace with genericList example from chapter 17. page 225, line 7, should be { return at(key); } page 226, second line from the bottom. Class X should be class A. page 227, semicolon needed after class declaration in figure 15.5. page 243. This entire chapter has been rewritten. The new version can be obtained via the mail server using keyword ``generic''. page 246, line 19 of figure 17.3, return on intReference must be made const in order to compile. Same on page 256, line 13 and 16 of figure 17.14. page 248, 6 lines from bottom. hyphenation should not occur in code. page 261, line 4, ``the the'' page 262, line 3, ``there there''=>``that there'' page 267 (top and bottom) and following page: material in curly braces should be in bold font, with curly braces removed. Hats (^) should be up arrows. page 269, line -16, are know => are known page 270. 10 lines from bottom. ``By declaring'' changed to ``By declaring as static''. page 271. Initialization of constants in class CardView should be removed. They must be initialized outside of class. page 276. Section 18.4 should be rewritten to make reference to the container classes is chapter 17, and to indicate that parameterized types are no longer experimental. In fact this has been done, and is included in the document obtainable from the mail server using the keyword ``generic''. page 312, line 12; class StartButton should be on new line. Page 320, line 12-13, should spell out numbers if you want to get the output that looks line page 136. page 378, line -2, should read: The process by which a value of a derived type is assigned to a variable declared as a base type. page 385. Second LaLonde entry should be ``LeLonde 90b'' not 90a. Minor typos page 60. Method heading (``color'') in smalltalk code at bottom of page should be bold, and there is no reason to double space the body of the method. pages 113-117. Again method headings in the smalltalk code should be in bold, also top of page 123. page 131 (bottom) no reason for program text to be double spaced, similar comment applies to code on pages 133, 275. page 371, line -4, In internal => An internal page 382. Citation for [Budd 89] should now be changed to Timothy A. Budd, ``Generalized Arithmetic in C++'', Journal of Object-Oriented Programming, 3(6): 11-23, February 1991. (should change the citation string to [Budd 91] as well. Citation is made in chapter 8). page 382, citation for [Cox 90] should now be changed to Brad J. Cox, ``Planning the Software Industrial Revolution'', IEEE Software, 7(6): 25-35, November 1990. page 386, line 1, ``C+ Primer'' should be ``C++ Primer'' =================In New Chapters=============================== The following have been reported in the new chapters that are not yet part of the book In the new chapter 17 page 2, line 10 should the the => should be the page 15, line 3, in an an array => in an array In the new GUI chapter page 14, line 8, sterotypical =>stereotypical page 15, line 11, newDocment => newDocument =================Acknowledgments =============================== The following people have notified me of one or more of the above errors. I am very grateful for their help Dave Butler, Rajeev Pandey, Sanjeev Qazi, Oregon State University David Ekchian, ETC-Hoenggerberg, Zuerich Masa Habu, Hewlett-Packard Mitsuru Ikei, Hitachi Chemical Company Ltd. Henk van Kampen, Piet van Oostrum and Gait Boxman, Rijks Universiteit Utrecht, Netherlands. Stefan Kuhlins, Universitaet Mannheim Mary Ann May-Pumphrey, Sun Microsystems Dave Myers, US West Marvin Shaprio, NIH Jason Snyder, Rose-Hulman Institute of Technology Guy Tremblay, McGill University Gerard Vaio, Harvard University Carla Williams, Fort Lewis College, Durango CO Jacqueline Zizi, French Translator for Addison-Wesley