Who asked: the market data team at Kestrel Brokerage, a fictional broker, which needs a small book for a test harness.
Why: the harness replays orders and checks what the book looks like after each one: the best bid and ask, the spread, how much size sits near the top, and what a market buy would fill.
The data: prices in whole ticks (an int) and quantities in shares. Each side is a std::vector<Level> of price levels, one level per price, kept sorted with the best price first: highest first for bids, lowest first for asks.
Done looks like: add_bid and add_ask that merge into an existing level or insert a new one in order; best_bid, best_ask (0 for an empty side) and spread (-1 when a side is empty); bid_depth over the top levels; cancel_bid that shrinks or removes a level; and buy that fills against the asks from the best price up, removing levels it empties. Real matching engines use faster structures for this; the vector keeps the logic visible.
In this project you build one C++ class that keeps the resting orders of a market by price level. Each step adds a member function, and your own code carries forward to the next step. The tests call every function you have written so far.