This lab is due by Monday, October 28, 2024, Before Class.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.
Jump To: Rubric Submission
We'll now expand the capabilities of our existing Warehouse example. Instead of being able to store only Boxes in the warehouse, we'll want to be able to store an instance of any type of thing. Download the templated warehouse starter pack. The program will not be able to build out of the box.
The Warehouse
class currently stores only a vector of Boxes. The Warehouse
class needs
to be properly refactored to be a templated class. The Warehouse
can store
an instance
of any type. The Warehouse
will likewise retrieve
the corresponding instance of any type.
The expected output of the completed program is below:
Made Warehouse H with 2 boxes
Warehouse H has 2 items (4, 2)
Setting Box 0 to size 5
Warehouse H has 2 items (5, 2)
Made Warehouse C with 3 strings
Warehouse C has 3 items (This, Is, template)
Manipulating strings 1 and 2
Warehouse C has 3 items (This, is, templated.)
Grading Rubric
Your submission will be graded according to the following rubric:
Points | Requirement Description |
0.70 | Fully meets specifications |
0.15 | Submitted correctly by Monday, October 28, 2024, Before Class |
0.15 | Best Practices and Style Guide followed |
1.00 | Total Points |
Lab Submission
Always, always, ALWAYS update the header comments at the top of your main.cpp
file. And if you ever get stuck, remember that there is LOTS of help available.
Zip together your Warehouse.hpp
file(s) and name the zip file L4B.zip
. Upload this zip file to Canvas under L4B.
This lab is due by Monday, October 28, 2024, Before Class.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.