Lab: Vectors

Assigned
Friday, 4 April 2025
Summary
In this laboratory, you will explore vectors, an alternative to lists for storing sequences of values.
Note
in 2021Fa, there were more problems and students only go through the first four. So I split the lab.

Preparation

a. If you have not done so, please conduct the normal “start of class algorithm”. Introduce yourself to your partner. Discuss work habits, strengths, and areas to improve.

b. Grab the code for the lab.

c. Review the documentation for the supplied procedures to ensure you understand what they are suposed to do. If you’re not sure, feel free to experiment or to ask the staff.

Acknowledgements

This lab has gone through many revisions throughout the years. The earliest version available is available at https://rebelsky.cs.grinnell.edu/Courses/CS151/2000F/Labs/vectors.html and appears to bear little resemblance to the current lab. That suggests that it has been updated by many hands over the years. Samuel A. Rebelsky is likely responsible for the helper code.