So far, we've covered a lot of the fundamental tools C++ gives us, as well as some general principles of good programming design, in particular including the design of Abstract Data Types (ADTs).
We'll now look at various Container ADTs, which allow us to store and organize collections of other objects. Using container ADTs from the C++ standard library as examples:
std::vector<double>
could store datapoints for statistical analysisstd::set<string>
could represent uniqnames of students registered for a coursestd::map<string, double>
could allow us to look up the price of an item on a menu by providing its nameIf you're not familiar with all these containers, don't worry - we'll introduce each briefly today. throughout the rest of the course.
You may also have seen that EECS 280 is called "Programming and Introductory Data Structures". We're now entering the data structures portion of the course. If a container ADT specifies the interface for organizing information, the underlying implementation is a data structure. We'll consider several possible data structures and their pros/cons for various purposes, including efficiency analysis.
1: Introduction to Standard Library Containers
|
2: Sequential Containers with Contiguous Allocation
|
3: Sequential Containers with Linked Structures
|
4: Iterator Interfaces and Traversal by Iterator
|
5: The
auto Keyword
|
6: Range-based
for Loops
|
7: Sets and Maps
7.1
7.1
Select the item below for participation credit. |