Meeting 03: Class Design and Testing

Today we will continue working on our Bag template using a static array internally and define more tests using CMake and Catch.

In-class Exercise

Consider a simplified version of the Bag ADT (without toVector).

  1. Download the starter code.
  2. Implement the bag methods in bag.tpp using an internal, automaticaly-allocated array of fixed size.
  3. As you work, add tests for each method in bag_tests.cpp.
  4. Build your code locally as you work.
  5. Submit your bag_tests.cpp, bag.hpp and bag.tpp as a zip file via Canvas at the Assignment "Exercise for Meeting 3".