Low-Level / Object-Oriented Design / Stage 2 · Changes of state
Assign work and manage resource lifetimes
"Already know" meets prerequisites. "Not relevant" removes the topic from your total but leaves what builds on it waiting.
Self-check
- Implement a parking lot that assigns spots by a policy. Add a second policy (nearest to the exit, say) without changing any caller, and show that a spot is always released when a car leaves, even on an error path.
- Evidence to include: Keep the policy interface, both policies, the unchanged caller, and a test that fails a departure halfway and shows the spot is still released.
Try it without the material first, then compare. Save your answer in your notes below. Report a problem with this self-check
Learning activities
2 activities- Not done6 min
- Not done6 min