REVIEW - Data structures and algorithms - with object-oriented design patterns in C++


Title:

Data structures and algorithms

with object-oriented design patterns in C++

Author:

Bruno R. Preiss

ISBN:

Publisher:

John Wiley & Sons Inc (1999)

Pages:

660pp

Reviewer:

Mark Radford

Reviewed:

August 1999

Rating:

★☆☆☆☆


The copyright date on the book is 1999, so how the author can write over 600 pages without mentioning the STL is completely beyond me. Instead, the author presents his own container designs, attempting an alternative, object- oriented approach. The design comes across as one originally done with a different language (Java, perhaps?) in mind and then applied to C++. Design patterns are thrown in, but in a rather superficial way. For instance, the way Visitors are implemented, they can support only very simple operations. An example of this is printing objects to an output stream. As long as the objects support a polymorphic output operator, knowledge of the concrete class is not needed. The Visitors presented here could not stand up to operations specific to the concrete type of the visited object being added to the object structure.

In my view there are some serious flaws in the author's approach to designing containers. For example, rather than use templates to provide type-safety, the author takes the approach of using a base class called 'Object'. His containers store pointers to 'Objects'. Of course, this means it is only possible to store objects of types derived from the 'Object' class. Therefore, it is not possible to do anything with the contained objects without first going through a type- laundering process. This, together with a very complex hierarchy of classes, does an excellent job of demonstrating that this is a poor approach in modern C++. It makes the whole thing far too complicated!

In conclusion, if you want a book on data structures, there are better books available. A good example in my opinion is Data Structures in C++: Using the STL by Timothy Budd (reviewed in C Vu of May 1998).


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.