Abstract

1. Object-Oriented Program Development. 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. Strong Information. Expressions, Statements, and Numeric Types. C++ Streams. 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. Recursive Functions. 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. Nested 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. Multidimensional Arrays. 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. Constructors Revisited. 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. Pointers. Dealing with Failures: Exit () and Assert (). References. Dynamic Array Creation. First Class Strings. Extensible Arrays. Implementation Standards for Classes with Pointers Data. 10. Inheritance and Reuse. Incremental Programming: Extending an Existing Class. Single Inheritance: Designing a Class Hierarchy. Multiple Inheritance. 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. Runtime Polymorphism. 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. Iterator Classes. List Variations Using Inheritance and Templates. Stacks and Queues. Message Passing: Letting the Nodes Do It Recursively. Tables. 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. Appendices. A: ASCII Character Codes and Escape Sequences. B: C++ Keywords. C: Operators Precedence. D: Stream Input. E: Stream Output. F: File Streams. Bibliography. Index. 0201765640T04062001

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call