Encapsulation

Steven Zeil

Old Dominion University, Dept. of Computer Science

Table of Contents

1. Encapsulation
1.1. Enforcing the Contract
1.2. Encapsulation in C++
1.3. Time for Encapsulation
2. Classes
2.1. Showing a Little Class
2.2. A Touch of Class
3. Hiding Attributes
3.1. Time Attributes
4. Inline Functions
4.1. How Functions Work
4.2. An Example of Function Activation
4.3. How Function Calls Work
4.4. Overhead
4.5. Inline Functions
4.6. How Inline Functions Work
4.7. Use Inline For Functions That Are
4.8. Inlining is Optional
5. Example: the Auction Program as Encapsulated ADTs