[first slide]
Introduction to Object Oriented Programming
Chapter 15
Case Study: Container Classes
Outline
- Strong Typing versus Containers
- Conventional Solution
- Containers in Dynamic Languages
- Three Solutions
- Common Base Link Type
- The Generic List Class
- A Link for Double Precision Numbers
- Using The List Class
- Hiding the Links
- Containers that Hold Only Pointers
- List and Link
- Example, a list of Windows
- Best Alternative, Templates
- A Template List Class
- Using Template Classes
- Advantages of Templates
- Iteration and Iterators
- Iterator Class
Other Material
- Self Assessment Study Questions
- The primary container library for C++, the STL, is discussed
in the next chapter. That chapter also has links to related
material.
- This chapters is largely concerned with containers in C++.
In another book I discuss containers in Java
in more detail.
- Students who want to learn more about different container
abstractions can consult my two books on
data structures in C++.