 |
|
|
|
|
Inheritance |
|
|
|
| |
 |
|
|
|
|
Deriving One Class from Another |
|
|
|
| |
 |
|
|
|
|
Software Engineering Tip: Inheritance and Accessibility |
|
|
|
| |
 |
|
|
|
|
Specification of the ExtTime Class |
|
|
|
| |
 |
|
|
|
|
Implementation of the ExtTime Class |
|
|
|
| |
 |
|
|
|
|
Composition |
|
|
|
| |
 |
|
|
|
|
Design of a TimeCard Class |
|
|
|
| |
 |
|
|
|
|
Implementation of the TimeCard Class |
|
|
|
| |
 |
|
|
|
|
Dynamic Binding and Virtual Functions |
|
|
|
| |
 |
|
|
|
|
The Slicing Problem |
|
|
|
| |
 |
|
|
|
|
Virtual Functions |
|
|
|
| |
 |
|
|
|
|
Object-Oriented Design |
|
|
|
| |
 |
|
|
|
|
Step 1: Identify the Objects and Operations |
|
|
|
| |
 |
|
|
|
|
Step 2: Determine the Relationships Among Objects |
|
|
|
| |
 |
|
|
|
|
Step 3: Design the Driver |
|
|
|
| |
 |
|
|
|
|
Software Engineering Tip: The Iterative Nature of Object-Oriented Design |
|
|
|
| |
 |
|
|
|
|
Implementing the Design |
|
|
|
| |
 |
|
|
|
|
Problem-Solving Case Study: Time Card Lookup |
|
|
|
| |
 |
|
|
|
|
Testing and Debugging |
|
|
|
| |
 |
|
|
|
|
Testing and Debugging Hints |
|
|
|
| |
 |
|
|
|
|
Summary |
|
|
|
| |
 |
|
|
|
|
Quick Check |
|
|
|
| |
 |
|
|
|
|
Exam Preparation Exercises |
|
|
|
| |
 |
|
|
|
|
Programming Warm-Up Exercises |
|
|
|
| |
 |
|
|
|
|
Programming Problems |
|
|
|
| |
 |
|
|
|
|
Case Study Follow-Up |
|
|
|
| |
|
|
|
|
|
17
Pointers, Dynamic Data, and Reference Types |
|
|
|
| |
 |
|
|
|
|
Pointers |
|
|
|
| |
 |
|
|
|
|
Pointer Variables |
|
|
|
| |
 |
|
|
|
|
Pointer Expressions |
|
|
|
| |
 |
|
|
|
|
Dynamic Data |
|
|
|
| |
 |
|
|
|
|
Reference Types |
|
|
|
| |