Each outcome is backed by the checks that test it. Solid means every check was right first time; with hints means you got there with a nudge; worth a revisit means an answer was revealed or is still wrong.
1
Ask the questions that turn a vague task such as "design a parking lot" into a short, agreed list of requirements, and say what is out of scope.
Not yet
2
Pick the classes, the fields and the methods out of a requirement paragraph, and draw them as a class diagram with the right kind of line between each pair.
Not yet
3
Write and read a working skeleton of the design in Python or Java, and predict the fee and the spot it gives for a new case.
Not yet
4
Follow one park and one unpark through the objects with a sequence diagram, and predict the state of the lot after a run of events.
Not yet
Your cheat sheet
What each lesson leaves you able to do, in one place. Lessons you have not finished are dimmed, not hidden.
Start a design by asking questions whose answers change the classes or the rules: which vehicles, which spot sizes, how fees work.
Write the answers as one short agreed paragraph of requirements, and read it back.
Tell a functional requirement (what the system does) from a non-functional one (how well it does it).
Add rules for the code where the paragraph leaves a choice open: levels in order, the smallest spot that fits, whole minutes, at least one started hour.
Write down what is out of scope, such as card payments and reservations.
Mark the nouns and verbs of the requirement paragraph: nouns are candidate classes, verbs are candidate methods.
Make a noun a class when the system keeps track of it with data of its own (an entity); make it a field when it is one value; leave it out when the system stores nothing about it.
Use an enum for a fixed list of named values, such as the three spot sizes.
Put each method on the class that has the data to do it, and add the methods the paragraph implies, such as finding a spot.
Give a rule that is likely to change, such as the fee, a class of its own even when no noun names it.
Draw the parking lot's ten classes and ten lines, starting from the vehicles and ending with the fee rule.
Use composition for parts that belong to one whole for life (spots in a level, levels in a lot, tickets the lot makes).
Use aggregation for a part made outside and handed in (the fee rule), and association for a field that only points at another object (a ticket's vehicle and spot).
Read the multiplicity labels: 1, 0..1, 1..* and 0..*.
Explain why the fee rule is its own class: one job per class, and a Strategy that can be swapped.