[Home Page] - [Reviews Main] | |
|
Teach Yourself Object-Oriented Programming with Turbo C++ in 21 Days by Greg Perry Recommended |
| ISBN: 0-672-30307-8 Publisher: Sams Pages: 776 pp disk from USA Price: £? |
| Categories: object oriented borland |
| Reviewed by M N Summerfield in Overload OL4 (Feb 1994) |
Naturally enough the 21 day learning period is broken down into three week- long sections, these in turn being broken down into days. Each week is followed by a review which comprises an example program that highlights the points covered so far and some explanatory text.
In the first week Perry looks at C++ in relation to C, showing why C++ is so much better even without classes. In this week he covers the use of inline and const to replace #define macros and constants. He introduces cout and cin, and distinguishes between cout and cerr. In this week he also covers pointers, references, const, new and delete, as well as function overloading.
The second week is where classes are introduced. Topics covered include access specifiers, member functions, and friends. The explanations of how to overload the built-in operators including << and >>, and on constructing and destructing objects are crystal clear. If you have any doubts about the use and implementation of constructors, object assignment operations, and copy constructors, you will find excellent explanations in the "Day 13" chapter. Chapter 14 gives good coverage of static, and a rather short and weak introduction to multi-file projects.
Inheritance is covered at the beginning of the final week, the author only explaining single inheritance fully, although he does give some explanation of multiple inheritance, and why he considers single inheritance to be enough for one's programming needs. Perry gives a clear exposition on when to use inheritance and when to use composition. Virtual functions are explained in the middle of the final week. The three weeks proper wind up with chapters on templates, on using Borland's container classes and on file I/O.
Turbo C++ makes a lot of effort to be "user-friendly", with an informal writing style and a gentle pace. This is backed up by key points being highlighted and simple exercises which are almost all answered in an appendix. The book is very encouraging, and because the exercises are so easy readers will quickly gain and maintain confidence through coding them and running them.
Perry has explained almost everything which he covers exceedingly well. However, the price of this is that sometimes he skimps on good practice in his examples, for example, after introducing const he avoids using it to save parameter lists becoming too long and confusing: surely a good reason for explaining typedef which is not covered at all. Similarly, although a warning about comparing floating point numbers is given, and a suggested solution is provided, such a comparison is done in one of the programs given as an answer to an exercise. He also uses un-escaped single quotes in strings, and outputs newlines with "\n" instead of endl.
The weakest sections in the book are those covering multi-file projects, templates, and file I/O. Even for beginners, I feel that these sections should be doubled in length to give an adequate level of explanation. The cover boasts "close to 200 complete programs", but these are almost all "toys", example programs included for their utility as educational examples, rather than of use in programming practice. The index is adequate although unfortunately the listings are listed in the main index under "listings" and shown in order of appearance instead of alphabetically. There are very few typographical errors in the text, although there are a few in the listings which look like cut and paste errors, and several diagrams have textual errors. Perry tells us that after reading this book, "you'll probably never write another C program": thanks to the quality of this book and the advantages of C++ over C, I agree with him wholeheartedly. The subjects covered are broken into manageable chunks, and are almost all very well explained.
All the exercises are straightforward and it is quite feasible to complete the book in the 21 day period. One might imagine that a book like this would be read once and then left on the shelf, but in fact because of the clarity of explanation, I think that most beginner C++ programmers would find it a useful reference in their early C++ days.
Overall, Teach Yourself Object-Oriented Programming with Turbo C++ in 21 Days, is thoroughly recommended to complete newcomers to C++, especially those who own a copy of the Turbo C++ or Borland C++ compiler.
To link to this review, please use the URL: http://www.accu.org/bookreviews/public/reviews/t/t001214.htm
Copyright © The Association of C & C++ Users 1998-2000. All rights reserved.