
Make a tracking number that cannot exist in a bad state: a record that checks its country and number, reads text like DE-004211 with a flexible constructor, prints itself back the same way, and checks text without throwing.
Model a parcel's journey as an enum: readable labels, final statuses, the moves each status allows, refused jumps, and a count of every status in declaration order.
Keep business accounts inside their credit limit: an interface with a default method, a class whose balance only changes through its methods, a checked exception that says how far over a charge went, and an Optional lookup by id.
Replay a day of scans at the tracking desk, writing every piece yourself: tracking numbers that clean and check themselves, statuses that allow only legal moves, accounts that stay within their credit limit, and a desk that lists every failure with its line number.