Track 17 · Lesson 3 of 12
Project: inventory manager
Model a shop's stock with classes: validated products, an inventory with stock movements, a custom exception for overselling, an audit history, low-stock alerts, valuation and a stock report.
You will be able to
- Decide which classes a problem needs and what data and behaviour belong to each
- Validate constructor arguments so an object can never be created in an invalid state
- Define and raise a custom exception that carries the details of what went wrong
- Keep an audit history of changes and answer questions from it
- Aggregate object data into alerts, valuations and an aligned report
Included with a Formula Quest membership
It has 6 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.
View Formula Quest memberships
Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.