Week 4 - Pointers & Objects, Aggregation
Learning objectives
Upon finishing this week, you should be able to:
- Write and trace code that uses pointers
- Use aggregation to build objects from other objects
Schedule
Day 1
- Finish Pointer Basics (Ch18.6-18.7)
- Pointers & Objects (Ch18.8-18.9)
Day 2
- Aggregation (Ch18.10-18.14)
Todo:
- Ch 18 Exercises
Day 3
- Operator Overloading (Ch 20.1-20.8)
Todo:
- Start work on assignment
Day 4
- Inheritance (Ch19.1-19.4)
Recommended Schedule
Day 1
- Finish Pointer Basics (Ch18.6-18.7)
- Pointers & Objects (Ch18.8-18.9)
Day 2
- Aggregation (Ch18.10-18.14)
- Ch 18 Exercises
Day 3
- Start work on assignment
- Operator Overloading (Ch 20.1-20.8)
Day 4
- Start reading Inheritance (Ch19.1-19.4) we will be covering the rest of the chapter next week, but you should get a start on it now.
Pointer Basics
You should have tackled 18.1-18.5 last week. Move on to 18.6-18.7.
This video demonstrates debugging pointers. Watch it after you are done with 18.6.
Pointers and Objects
Ch 18.8-18.9 focus on using pointers with objects. This videos review those sections:
18.8:
18.9:
Aggregation
The last part of Chapter 18 covers aggregation, which is using objects as member variables of other objects.
These videos review sections on aggregation:
18.10-18.11:
18.12:
Finally, this video walks through the Ch 18.13 family tree example. It demonstrates using the VSCode debugger to examine the objects and pointers involved. So even if you understand the concepts without the video, it is worth a quick watch to see the debugging techniques.
Operator Overloading Basics
Chapter 20 introduces operator overloading. (We are not doing the exercises, just the reading.) We will use operator overloading in the future, but you don't need to be an expert at it. As long as you pick up the key ideas, you can look up the syntactic details when you need them.
This optional video gives an overview of the chapter:
Inheritance Basics
We will finish up Chapter 19 next week, but you should get a start on it now. The schedule for next week will assume you have read 19.1-19.4 this week.
This optional video review the basics of inheritance from those sections: