CSCI 200 - Fall 2023
Foundational Programming Concepts & Design

Lab 4B - A Templated Warehouse

This lab is due by Tuesday, October 31, 2023, 11:59 PM.
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
H: Warehouse has 2 items (4, 2)

Setting Box 0 to size 5
H: Warehouse has 2 items (5, 2)

Made Warehouse C with 3 strings
C: Warehouse has 3 items (This, Is, template)

Manipulating strings 1 and 2
C: Warehouse has 3 items (This, is, templated.)

Grading Rubric


Your submission will be graded according to the following rubric:

PointsRequirement Description
0.70Fully meets specifications
0.15Submitted correctly by Tuesday, October 31, 2023, 11:59 PM
0.15Best Practices and Style Guide followed
1.00Total 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 files and name the zip file L4B.zip. Upload this zip file to Canvas under L4B.

This lab is due by Tuesday, October 31, 2023, 11:59 PM.
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.