Track 17 · Lesson 9 of 12
Project: community library system with tests
Model a lending library with Book, Member and Library classes, enforce loan rules and late fees with clear errors, then write tests that prove the rules hold.
You will be able to
- Design a small domain model of cooperating classes from a requirements brief
- Enforce business rules with validation and a custom exception that carries a clear message
- Calculate due dates and late fees from dates passed in, so results are reproducible
- Write test functions that pin down the rules, including boundaries and error cases
- Judge the strength of a test suite by whether it catches deliberately broken versions of the code
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.