What this prompt does
This prompt simulates an object-oriented design interview where the model acts as interviewer and you design [system_to_design] in [language]. It presents the problem and lets you ask clarifying questions, then evaluates your class identification and responsibility assignment, your inheritance-versus-composition choices, SOLID adherence, and design-pattern usage for [pattern_opportunities]. It asks you to handle [extension_scenario], challenges you on [challenge_areas], has you code [code_portion], then scores you across five dimensions and provides an ideal design with a Mermaid UML diagram plus common mistakes.
The structure works because OOD interviews reward reasoning aloud, and this prompt makes you justify every relationship and abstraction before revealing the model answer. The [extension_scenario] variable is the key pressure test — it checks whether your design is actually extensible or just looks clean. [pattern_opportunities] points you at where patterns genuinely fit, [challenge_areas] targets your likely weak spots, and the Mermaid UML output gives you a concrete reference to compare your class diagram against. Asking you to code only [code_portion] rather than the whole system keeps the session focused on the high-signal core logic, which mirrors how real OOD rounds spend most of their time on design discussion and reserve coding for the part that proves your abstractions hold.
When to use it
- You are preparing for object-oriented design interview rounds
- You want feedback on class responsibilities and inheritance-versus-composition choices
- You need practice applying SOLID principles and spotting violations
- You want to pressure-test whether your designs are genuinely extensible
- You are designing a new system and want a second opinion on the class structure
- You want a scored, five-dimension read on your OOD reasoning
Example output
Expect an interactive interview: the problem, your clarifying questions, and evaluation of each design decision as you make it. After about thirty minutes it scores you out of five on Class Design, Patterns, Extensibility, SOLID, and Communication, then provides an ideal design with a Mermaid UML class diagram and a list of common mistakes specific to [system_to_design], so you can compare directly and see exactly where your abstractions diverged from a strong reference.
Pro tips
- Choose a
[system_to_design]that has real extension points, like a parking lot or booking system, so the extensibility test bites - Actually ask clarifying questions first; jumping straight to classes loses points in real OOD interviews
- Take
[extension_scenario]seriously — it is the cleanest signal of whether your abstractions hold up - Use
[challenge_areas]to target known weak spots like concurrency or strategy changes under pressure - Talk through your reasoning out loud, since the Communication score rewards explaining decisions, not just coding them
- Compare your class diagram against the returned Mermaid UML to spot weak abstractions you missed