The example problems used to illustrate C++ programming arise from the business environment. These range from common utility classes such as String and Money to more domain-specific classes such as Account, Mortgage, and Portfolio. The emphasis is on well-designed and documented interfaces. In contrast, analysis of the efficiency of methods is left to more advanced studies of C++.
For the last three years, I have used draft versions of this book to teach a one-year beginning programming course in the Business School of Baruch College. The end result of the approach to C++ as illustrated in this book is a marked improvement in the organization, modularity, and focus of students' programs. Introducing "interface" as the first topic makes abstraction the immediate focus. Students often have trouble with abstraction, but once they climb this hurdle, they use it to produce better work. The precondition and postcondition documentation in the interface helps keep the student focused on what task a method must fulfill.
In my experience, those who already know how to program procedures and think in terms of algorithms have difficulty giving interface design its proper due. These same programmers feel it necessary to know the internal details of the class implementation in order to use objects belonging to that class. Moreover, those who are used to procedural programming techniques have a tendency to overuse global identifiers. The object model encapsulates inside the object much of the data that its methods need, and in this manner reinforces better programming habits.
A secondary goal of this book is to encourage the habit of incremental software development. Too often beginners, and experienced programmers, write a huge amount of code before compiling and testing. Not only does incremental development provide a more controlled means for debugging code, but it also promotes the idea of class development as an evolving process. The book describes a process of incremental development that begins with the interface, and then uses method stubs to code the features of the interface, before working on the algorithm behind the method. Upon satisfactory implementation of the features in the original interface, the process returns to the interface to design and code more features. Beginning programmers find it easier to acquire a habit of incremental development from the beginning, but experienced programmers can benefit too. My own programming habits showed marked improvement as a side benefit of teaching this approach.
A third goal is to portray object-oriented programming as the art of tool building and a class as a "software tool." Programming teams work together to create and combine software tools to produce "industrial-strength" solutions. Programs are multiple-file affairs requiring the use of a project manager. The approach in this book is to use one file to store the class interface, another file to store the class methods, and other files for sending messages to objects belonging to that class. This approach lends itself to the tool-building model through the separation of the class interface from its implementation. The class interface serves as a contract between the tool builder who codes the logic of the class methods and the tool user who sends messages to objects belonging to that class. Although the overhead is higher initially, the reader becomes a tool builder and learns how to use existing classes to build new ones.
And What If You Are Not a Beginner. . . .Understanding object-oriented programming is impossible without understanding the object model. Many existing C++ programs are not object oriented. By putting the object concepts up front and building a framework for the object-oriented paradigm, the book makes it easier for an experienced programmer who is familiar with the procedural model to make the transition to object-oriented programming with C++.
The correct use of C++ as an object-oriented programming language requires more than just an understanding of the object model - it also requires knowledge of the backbone features that all classes possess. These include constructor, destructor, and assignment operators.
The Standard Template Library (STL), adopted by the ANSI/ISO C++ Standards Committee, provides a toolbox of classes for managing collections of objects. STL relies on the programmer to realize the importance of the aforementioned "backbone" members. Moreover, the programmer must know how to overload comparison operators for any class whose objects belong to a sorted collection.
An understanding of object-oriented concepts is essential to many endeavors not directly targeted to coding in C++. Understanding object-oriented concepts is the key for moving from C++ to Java. Microsoft's OLE (object linking and embedding) is becoming a standard for tying together independent applications. Powersoft is a client/server database application development tool that incorporates a middle tier between the front-end client and back-end database. This middle tier consists of classes of nonvisual objects that can be used for encapsulating business logic. Powersoft's literature says that the first step in learning to use such a tool is to "obtain an OO education."
ApproachIf you had to sum up this book's approach in one word, that word would be "interface." Coding starts with the interface. Interface implementation means coding and testing the feel of the class interface before designing the methods that make the interface functional. Only after the interface is tested and satisfactorily documented does attention turn to design of the methods. The presentation of top-down, structured algorithm design is covered in the context of method design. Although playing a secondary role to interface, algorithm design is very important and is covered in the first part of the book.
From the start, the book takes a holistic approach. The reader sees both sides of object-oriented programming (OOP): implementation as well as the use of classes. The interface is the channel of communication between implementors and users. The beginner will obtain a reasonable understanding of both abstraction and details.
Most of the examples in this book belong to the problem domain component of object-oriented design. These are the classes that do the behind-the-scenes work. These nonvisual objects encapsulate business logic such as figuring out the market value of an investment, tracking the outstanding principal on a mortgage, and so on. Other types of examples include utility classes that fulfill a more generalized need such as the String and Date classes. The book downplays those classes that fall into the categories of graphical user interface (GUI) or data management. GUI and data management classes are specialty areas and implementation of these classes would distract from the fundamental object concepts covered by the book. The marketplace is providing an ever-increasing supply of GUI class libraries. Moreover, there is a lot of activity currently to extend database management systems to provide object storage capabilities.
This book covers a subset of the C++ features that support the object model. C++ is a hybrid language based on the C language and it contains many features that do not support the object model. In addition to emphasizing those features of C++ that do support the object model, this book also recasts the non-OOP features of C++ in light of the object model.
Innovative FeaturesPresentation of the object model and an overview of the role objects play in problem solving before coverage of the C++ language.
Emphasis on the class interface as the first step in writing C++ code.
Incremental implementation of a class. Through the use of method stubs, implementation and testing of a class interface occur before implementation of the algorithms behind the methods.
The separation of a class implementation into two files from the very beginning. This promotes the abstraction of what a class can do and separates that abstraction from the class implementation.
Using projects to coordinate teams of programmers. "Industrial-strength" software requires separate teams of programmers.
Organization of files into separate "include" and "source" directories for facilitating sharing of classes.
Presentation of pointers as a mechanism by which one object contains or is associated with another object.
Emphasis on class design issues. One entire chapter is devoted to the backbone methods for classes. These include methods that are implicitly given default behavior unless explicitly defined by
* Assumes no prior programming knowledge.
* Illustrates how objects can be used to solve large-scale business problems whose requirements are in a constant state of flux.
* Provides information on multifile projects, a prerequisite for working in teams.
* Demonstrates incremental program development and emphasizes well documented classes.
* Emphasizes the importance of class design in producing cohesively coded modules with a minimal degree of dependency on other code.
* Shows how to design and implement a class interface before its methods.
* Covers essential, yet behind-the-scenes features of C++ like constructors, destructors and assignment operators, and positions the reader to explore new features of the C++ standard including templates, exception handling, and run-time.
0805316744B04062001
Product Details
Would you like to update product info or give feedback on images?
|
|
Share your thoughts with other customers:
|
||||||||||||||||||||||
|
Most Helpful Customer Reviews
2 of 2 people found the following review helpful:
1.0 out of 5 stars
Worst Book on C++ I've Read -- Zero Stars,
By A Customer
This review is from: Building Business Applications Using C++: An Introduction to the Object Model (Paperback)
Nice diagrams, slick paper and trendy typesetting. Otherwise, this book is HORRID. What is worse is the back cover promotes the feature: "Assumes no prior programming knowledge." And the sarcastic retort could be "Because if you knew better, in no way would you select this book." The book's presentation obfuscates C++ concepts in a way that can seriously impair a beginner programmer. Difficult concepts are introduced before fundamentals. There are MANY major and minor procedural flaws throughout the book. The minor ones tend to be imperceptible unless you already have some experience with the language -- which makes it even more frustrating because you need to constantly correct the text. Maybe this is part of the ""holistic"" approach the text tries to sell. Simple concepts are for some reason rendered tightly knotted due to the author's poor compositional and organizational style. It is clear though that the author does not have thorough knowledge of the topic and does not understand basic concepts of mathematics. Furthermore, in an effort to clarify a difficult concept, the author frequently leads the reader through a morass of disjointedly digressive analogy, leaving the reader wondering what the heck is going. As an example, the author on Headers: "Although one header can be included in many different files, it is wrong to include a header more than once in the same file. Even if we take care to write the #include directive only once, we still can't be sure that the header is not included more than once in a file. We could have indirectly included the header another time without realizing it. By analogy, just because you didn't directly tell someone a secret about yourself, it doesn't mean they don't know it. You could have told someone, who then told someone else..." Imagine every other page with this kind of style. Imagine the worst most confusing 'instructor' you had in college. Then imagine he/she authored a book on C++ in an effort to secure tenure. Well, then, here it is. And fault Addison-Wesley for not peer-reviewing this text THOROUGHLY. This book is a well-polished zero.
2 of 3 people found the following review helpful:
4.0 out of 5 stars
Excellent Introduction to C++,
This review is from: Building Business Applications Using C++: An Introduction to the Object Model (Paperback)
(Revised version) Professor Lucy Garnett's book is a great introduction to understanding what Object Oriented Programming is in general and what C++ is in particular. Before I read Professor Garnett's book, I could not really grasp the overall picture of what Object Oriented Programming and C++ are all about. No book is perfect, but where this book truly excels is in getting the reader (especially a beginner to C++) to think in terms of how to BEGIN to go about understanding C++ and designing a C++ application. I read some of the negative reviews written about this book and it saddens me BECAUSE this book had and is having a very positive impact on my understanding of C++. I also think that some of the negative criticism is not justified BECAUSE the readers were looking for something different than what the author is truly offering. I feel that Professor Garnett provided a more personal touch (complete with comic strips, homemade diagrams, pictures, and an eye marker). You guys may think I'm a little off, but I really love those diagrams of the various factories. REASON: I feel the author provided them because she cared so much that readers would be able to grasp the concepts she is covering. Professor Garnett's book provided ME with homemade wholesome food with true flavor rather than processed, completely structured, and dried-up fare that you can get from many other fast-food and not-so-fast-food type books. I also want to say that I have looked through a number of other books on C++ and quite a few of them are much less readable and understandable than Professor Garnett's book is. It seems to me that this author went to great lengths to make people understand C++ and want to learn C++. In addition, none of the other books gave me anywhere near as good an overall view of what C++ is all about -- in terms of introducing a beginning student to C++. Hope more of you feel the same way. Robert Kayton
1.0 out of 5 stars
Not for beginners,
By A Customer
This review is from: Building Business Applications Using C++: An Introduction to the Object Model (Paperback)
Had a very hard time with this book. Not good at introducing new topics clearly. Too limited in scope while providing too much depth in some areas that are not clearly explained.
Share your thoughts with other customers: Create your own review
|
|
Tag this product(What's this?)Think of a tag as a keyword or label you consider is strongly related to this product.
Tags will help all customers organize and find favorite items. |
|
This product's forum
Active discussions in related forums
Search Customer Discussions
|
Related forums
|