An Introduction to Object-Oriented Design in C++
- Hardback | 750 pages
- 187 x 233 x 34mm | 1,255g
- 01 Jan 1996
- Pearson Education (US)
- United States
Table of contents
What is Object-Oriented Program Development?
Sample Problem: The Convenience Store Owner.
Sample Problem: The Changemaker.
Compilers and Languages: Making the Program Run.
Why Do People Think Object-Oriented Development Is So Important?
2. C++ Tools: Anatomy of a Simple Program.
The Convenience Store Owner Program, Line-by-Line.
Expressions, Statements, and Numeric Types.
Programming Style: Does It Matter?
Making Sure the Analysis, Design, and Implementation are Correct.
3. Implementing Object Behaviors with Functions.
C++ Functions that Return Values.
Procedures: Functions that Do Not Return Values.
Scopes and Lifetimes.
Programming Errors and Functions.
Refining Object-Oriented Designs.
Using Class Libraries.
4. Decision Behavior: Selections and Alternatives.
The if and if/else Statements.
Evaluating Boolean Expressions.
Typedefs and Enumerations.
More Alternative Selections, switch Statements.
The Conditional Operator: Providing Shorthand for a Simple if/else.
Testing: The Evaluation Part of the Implementation Process.
Application Example: Navigational Running Lights.
5. Iteration Behavior: Loops.
The First Structure: while Loops.
Constructing Loops: Starting, Quitting, and Getting to the Next Step.
An Alternative Loop Structure: Do/While Loops.
The Third Loop Structure: for Loops.
Alternative Loop Constructions and the Break Statement.
Design Modification: Redesigning the Calculator.
A New Problem: Text Analysis.
6. List Objects and Array-Based Implementations.
Implementing List Objects with Old Programming Tools.
Arrays: the Fundamentals.
List Type Objects.
Array-Based Implementations of Simple Lists.
Sorting and Searching.
Strings: Implementation Tool for Names and Phrases.
List of Names.
Redesigning the Changemaker to Fit Implementation Changes.
7. Producing Objects through Classes.
Simple Objects: Structs.
Implementing Objects with Behaviors: Classes.
A Simple List Class with an Array Data Member.
A Class with String Data.
Classes with Class Type Member Data.
An Inventory Table Class.
The i. Changemaker; Revised with Classes.
Organization of Program Source Code and Libraries.
Sharing Constant Class Data.
8. First Class Objects.
A Numerical Example: Rational Numbers.
A Second Example: 3-Dimensional Vectors.
Designing First Class Types.
Efficiency: In Lining.
9. Storage Management for Objects.
Dealing with Failures: Exit () and Assert ().
Dynamic Array Creation.
First Class Strings.
Implementation Standards for Classes with Pointers Data.
10. Inheritance and Reuse.
Incremental Programming: Extending an Existing Class.
Single Inheritance: Designing a Class Hierarchy.
Using Inheritance to Organize Code.
C++ Streams: Built-In Inheritance.
Changing the Changemaker Solution to Incorporate Inheritance.
11. Polymorphism and Generic Classes.
Ad Hoc Polymorphism: Overloading and Overriding.
Parametrized Polymorphism through Templates.
Abstract Base Classes.
Polymorphism and Cloning for Array-Based Lists.
Changemaker, Revisited Again.
12. Container Classes and Linked Lists.
Example of Containers.
Linked Lists and Traditional List Algorithms.
Implementing a Linked List Type via List and Node Classes.
List Variations Using Inheritance and Templates.
Stacks and Queues.
Message Passing: Letting the Nodes Do It Recursively.
13. An Example Reconsidered: Some Issues in Design.
An Example Revisited: Some Issues in Design.
Has-a vs. Is-a Relationships.
Memory Leaks, a Common Flaw.
Finite State Machines for specification and Imple- mentation Correctness.
Separating Public Interface from Implementation Details.
A: ASCII Character Codes and Escape Sequences.
B: C++ Keywords.
C: Operators Precedence.
D: Stream Input.
E: Stream Output.
F: File Streams.
About Jo Ellen Perry
Harold Levin is an Associate Professor in the Department of Philosophy and Religion at North Carolina State University. He received his BS in Mathematics from MIT and his Ph.D in Philosophy from MIT. During his years at MIT, he was a systems programmer at Project MAC. He has taught with the Computer Science Department at all levels, including seminars in C++ and object-oriented programming.