Design a parking lot system using OOD principles
Reported in WorldRemit European engineering loops. Object-oriented design classic testing modeling and extensibility.
Interview scenario
Context for WorldRemit candidates:
Support multiple floors, spot types, tickets, and payment processing.
Model answer
Try answering aloud first
Cover trade-offs, structure, and a concrete example before revealing the baseline response.
How to frame this at WorldRemit: Connect your answer to measurable impact, clarity of thought, and trade-offs the team cares about. Below is a strong baseline response you can adapt with your own project examples.
Identify core entities first: ParkingLot, Floor, Spot, Vehicle, Ticket, and Payment. Model spot assignment rules through a strategy interface so policies can vary by vehicle type or peak hours.
Encapsulate state transitions clearly, such as ticket issued, occupied, paid, and exited. Keep responsibilities cohesive: availability management should not be mixed with billing logic.
Good interview answers include extensibility points like reservation support, electric charging spots, and admin reporting without rewriting core classes.
Discussion
Comments (0)
Share how this question came up in your loop, or add tips for others preparing.
Log in to comment on this question.