Design a Car System
This prompt comes from one first-hand report, an SDE-1 Java loop in Pune written up in October 2025 by a candidate with about a year and a half of experience. It came up in the first technical round, a screen. The same round asked them to explain OOP to a five-year-old and to print the prime numbers in a range. The candidate called the round simple and conceptual. That tells you how big the answer should be. Plan for a whiteboard of classes and a short conversation about patterns. This isn't an hour of machine coding, and there are no servers to size.
The candidate's later rounds show what the loop cares about. In the bar raiser round they debugged two buggy Java snippets, and one of them was a Singleton. The hiring manager asked which design patterns they knew. They named Singleton, Factory, Builder and Observer, and the manager asked them to explain Builder. A car gives three of those four a natural home, so practicing it covers ground the later rounds came back to.
A car is the textbook OOP example, which helps and hurts. Everyone has seen a Car class that extends Vehicle, and the round is checking whether you get past that. A car has an engine. It comes in models and variants, and a buyer picks from a long list of options. Each of those points to a specific choice: composition for the engine, a Builder for the options, a Factory for the models. Make those three choices, say why, and you've answered the prompt.
MastercardPremium lesson · System design round
The Mastercard design, worked end to end.
- Requirements and scopeSystem design
- The API and data model
- The design, drawn out1 diagram
- 4 deep divesWith the tradeoffs
$49 a year · all 107 companies · instant access
116 Mastercard interview reports · guide updated
Mastercard interview guideKnow what Mastercard asks before you walk in.
29 coding · 4 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.