Week 8 - Templates and Array Lists

Learning objectives

Upon finishing this week, you should be able to:

  • Create and use generic functions using templates
  • Create and use generic array-based data structures
  • Describe how array based lists implement common operations

Schedule

Day 1


Day 2

Todo:

  • Do Ch 23 Exercises 1

Day 3

Todo:

  • Do Ch 23 Exercises 2

Day 4

Todo:

  • Do Recursion Practice WS

Suggested pacing


Day 1


Day 2


Day 3

  • Finish ArrayLists (Ch 23.11-23.15)
  • Do Ch 23 Exercises 2

Day 4


Templates

Read Ch 23.1-23.7.

These optional videos cover the basics of templates and how to include template code in your project:

Templated functions (Ch 23.1-23.4):


Including templated code (Ch 23.5):


Templated structs and classes (Ch 23.6-23.7):


Array Lists

Read Ch 23.8-23.15.

These optional videos cover the basics and more advanced features of array lists:

Array List basics (Ch 23.8-23.10):


Array List advanced (Ch 23.11-23.14):


Recursion Basics

Read Ch 24.1-24.4 and do this practice worksheet to develop your understanding of the mechanics of recursion:

This optional video reviews the basics of recursion:


And this brief one explains why we need recursion: