Week 04: Vectors – Dynamic Arrays
SLOs for Week 04
Students will be able to…
- recognize a copy constructor and implement it.
- identify the 3 situations in which a copy constructor is called
- reason about the difference between a shallow and deep copy of a data structure.
- use the new operator to dynamically allocate memory and the delete and delete[] operators to free up the memory.
- explain when C++ calls the destructor on an object.
- explain when it is important to implement the destructor explicitly for a class.
- understand the implementation of a dynamic array data structure, including how it adapts its internal size to accommodate the number of values in the array.
- implement operator overloading for a class.
Slides, videos, and application exercises
Project 04: Vec – A First Dynamic Data Structure
Vec – A First Dynamic Data Structure