Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Object-oriented programming using C++
Pohl I., Benjamin-Cummings Publ. Co., Inc., Redwood City, CA, 1993. Type: Book (9780805353822)
Date Reviewed: Mar 1 1994

Object-oriented programming has aroused high expectations. Yet many purchasers of C++ compilers use them as the latest version of C with an improved user interface. The object-oriented features remain unused because object-oriented programming requires a major shift in a programmer’s way of thinking about the art. Making this transition gracefully requires more study and practice than would normally be required in merely learning a new language.

The concepts of object-oriented programming are not unique to C++. Since C++ can be thought of as a superset of C, the investment of time and money in previously written programs in C is not lost. The C programmer learning object-oriented programming in C++ builds on previously developed skills. For these reasons, C++ has become the dominant object-oriented programming language.

Pohl identifies the experienced programmer in FORTRAN or Pascal as the intended reader. The traditional C programmer should also be included. The operative world in this description is “experienced.” Since the book is a text with learning objectives, summaries, and homework exercises, it can be used in a classroom, but only with students who are already proficient programmers. It can be used for self-study as well.

The book has 12 chapters and four appendices. The first chapter is motivational and introduces the reader to the important concepts underlying object-oriented programming, although they might not mean much initially. The remaining 11 chapters develop these ideas more fully by the use of continually developed abstract data types that represent strings, arrays, polynomials, stacks, linked lists, and binary trees and that appear as both text examples and exercises.

Chapters 2 through 4 review the kernel language, the subset of C++ that is, for all practical purposes, equivalent to C. They may be too terse for, say, a FORTRAN programmer who has not written C before. A total of 59 exercises at the ends of the chapters that require the adaptation of examples in the text and the writing of new programs will help get the reader up to speed, however. The newcomer to C should do them all. Where C usage and C++ usage differ, Pohl teaches the C++ usage.

Instruction in the central issues of object-oriented programming begins with a discussion of data hiding and members in chapter 5 and object creation in chapter 6. The concept of a structure is expanded to include functions so that a method incorporating both data and operations on the data can be packaged as a complete abstract data type. Pohl quickly introduces data hiding through declarations of private and public members. The class is introduced, and scoping rules in classes are presented. Constructors and destructors are used to create and remove objects, respectively.

Operator overloading introduces the study of polymorphism in chapters 7 and 8. Chapter 7 treats the general issues of operator overloading, and chapter 8 focuses on the special topics of iterators and containers. The vector, matrix, and string classes are the primary examples used in these two chapters. Quicksort is rewritten in order to show how iterators can be used in a well-known algorithm.

Pohl devotes chapter 9 to inheritance and code reuse. The vector class is extended to include arrays with dynamic upper and lower bounds. A class for binary trees is developed using inheritance. By this point, the diligent student will have used and written much of the code needed for the major data structures in the form of C++ classes. Virtual functions and abstract base classes are used to illustrate pure polymorphism by means of a predator-prey simulation that is continued as a large project in the exercises.

Generalization of classes to allow parametric polymorphism (to allow the same code to be used with different types) is handled by means of templates. This approach is the subject of chapter 10. The concept is developed by generalizing three major examples--the vector and binary tree classes and the quicksort algorithm.

Exception handling is discussed in chapter 11. Exceptions are handled using assert.h and signal.h and the commands throw and catch. Most of the chapter is devoted to the details of code implementation and is somewhat dense.

The last chapter is on the object-oriented programming paradigm and C++ from a software engineering perspective. Pohl is direct about the complexities of C++ and the ambiguities in the language. The programmer who wishes to become skillful in C++ must make a major effort. Nonetheless, the author encourages the reader to persist because the discipline gained by accepting and internalizing the object-oriented programming paradigm will result in the writing of large and complex systems that are robust.

The book has four appendices. Appendix A is a list of the ASCII character codes. Appendix B is a table of operator precedence in C++. Appendix C is a synopsis of the C++ language, excluding I/O. Appendix D is exclusively devoted to I/O in C++.

This book is well written. No chapter has fewer than 10 exercises, and many chapters have nearly 20. The book is not keyed to any particular compiler. This flexible text will serve well both in the classroom and for self-study.

Reviewer:  Anthony J. Duben Review #: CR116247
Bookmark and Share
  Featured Reviewer  
 
Object-Oriented Programming (D.1.5 )
 
 
C++ (D.3.2 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Object-Oriented Programming": Date
Object-oriented programming systems, languages, and applications
Paepcke A.  Object-oriented programming systems, languages, and applications,Phoenix, AZ,Oct 6-Oct 11, 1991,1991. Type: Whole Proceedings
Oct 1 1992
Object lifecycles
Shlaer S., Mellor S., Yourdon Press, Upper Saddle River, NJ, 1992. Type: Book (9780136299400)
Apr 1 1993
Object-oriented programming
Voss G., Osborne/McGraw-Hill, Berkeley, CA, 1991. Type: Book (9780078816826)
Oct 1 1992
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy