Week 9 - Vectors

Learning Objectives

Upon finishing this learning module, you should be able to:

  • Use vectors to store collections of data
  • Design functions that use common patterns to process vectors

Schedule

Day 1

In class:

  • Vector Intro

Outside class:

  • Get started on Vectors (Ch 13.1-13.6)

Day 2

In class:

  • Vector Loops

Outside class:

  • Continue working on Vectors (Ch 13.7-13.10)
  • Work on Ch 13 Exercises 1

Day 3

In class:

  • Vector function recipes

Outside class:

  • Finish reading about Vectors (Ch 13.11)
  • Work on Ch 13 Exercises 2
  • Check out the assignment

Day 4

No class. Enjoy Thanksgiving break!




Day 1

  • Get started on Vectors (Ch 13.1-13.6)

Day 2

  • Continue working on Vectors (Ch 13.7-13.10)
  • Work on Ch 13 Exercises 1

Day 3

  • Finish reading about Vectors (Ch 13.11)
  • Work on Ch 13 Exercises 2
  • Check out the assignment

Day 4

Eat Turkey and/or pie. :)



Vectors

Read Ch 13 on Vectors.

The first exercise set covers mostly 13.1-13.6, although the concepts in 13.9 (pass by value vs pass by reference for vectors) may also be helpful.

Exercise set 2 covers 13.7-13.10 and focus on loops that process vectors.

Check out this video about using the debugger with vectors:

Important Video

These next videos are optional, but may help clarify some concepts.

This one reviews iterators and how they are used with erase and insert (13.6)


This one reviews passing looping strategies (13.7-13.8):


This one covers passing vectors to functions and the kinds of jobs we do with vectors (13.9-13.10):