Top 3 Object oriented design Interview Questions
Browse 3 real-world technical and behavioral interview questions about Object oriented design. Review scenarios, edge cases, and architectural best practices.
You may use an AI coding assistant in the machine-coding round. What do you still write yourself, and what do you ask it for?
Write the domain model, the interfaces and the code enforcing each invariant yourself, because the grader scores them and a mid-round change tests them. Hand the assistant bounded boilerplate such as records, an in-memory repository, a driver and test scaffolding, and review every line it returns.
Write a game where two players take turns and either of them can win. What do you model, and where does the win check belong?
Model a Board that only stores marks and rejects illegal squares, and a Game that owns the turn and a status of in progress, won or drawn. The win check belongs inside the Game's move method, testing only lines through the square just played and running before the draw check, so a finished game refuses further moves.
Design a parking lot system — you have 90 minutes, working code at the end.
In a parking lot machine coding round, scope one deterministic flow of park, unpark and charge, model Vehicle, Slot, Level, Ticket and a ParkingLot facade, then push slot allocation and pricing behind strategy interfaces so review-time variants are configuration rather than surgery.