How to Ace Object-Oriented Design Interviews
Published: 2020-12-29 05:11:54


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2tizvkybsf3un9lht4ag.png)

Most candidates are afraid of object-oriented design interviews. The reason is that they do not understand how to tackle such interview questions. Some commonly asked object-oriented design interview questions include:

 - Design a Parking Lot System
 - Design an Elevator System
 - Design a Traffic Controller System

When an interviewer asks such a question, you need to understand first what he wants, what he is looking for in the candidate. And so, you need to first discuss all the requirements of the system before jumping to go and design it. Don’t assume anything on your own but specifically clear out every possible detail with the interviewer first in the first 5 to 10 min since this type of question is usually vague question. In general, you need to understand the following:

1. When an interviewer asks you this question, the first thing he is looking for is your requirement collection expertise. Whether you can clearly list out all the possible requirements and whether you can scope the problem into something that you can solve in 30–45 min.

2. Another thing that the interviewer may be looking for is your design skills, especially object-oriented design. He is looking for how well you can design the whole system in terms of components and classes. How you will model the system (such as parking lot or an elevator system) into different classes, identify constraints and design interfaces. How well-versed you are in object-oriented design concepts like abstraction, encapsulation, inheritance, and polymorphism, etc. Can you define the links and associations between the classes or objects in the system or not?

3. Another thing you need to consider is that when you are designing such a system, you should be discussing the design in terms of different design patterns. The design patterns are a well-described solution to the most commonly encountered problems which occur during software development. These represent the best practices used by experienced object-oriented software developers. This shows the interviewer about your experience in object-oriented design and analysis and provides positive feedback to your overall interview performance.

4. The interviewer also looks for whether you can identify different object-oriented design patterns or programming patterns while designing the system.

5. Sometimes the interviewer present you with a situation to evaluate how you can tackle concurrency in your design. E.g. In a parking lot design question the interviewer can suggest that the parking lot has two or more entrances or exits.

6. Sometimes he gave you some requirements about the system (e.g. selecting a parking spot near the entrance in the parking lot system design question) to see how you can figure out an optimal solution for the problem

7. This type of question is not a distributed system design question and so you should not try to solve it as a distributed system design unless you have clearly discussed this with the interviewer in the requirement collection phase. If you try to solve it as a distributed system design question, then an interviewer can interpret it as you have not sufficient experience to scope a problem and instead of simplifying, you are over-complicating the problem.

If you are interested to know more, you can check out the below video where I am discussing the design of a parking lot system in more detail.

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/tVRyb4HaHgw/0.jpg)](http://www.youtube.com/watch?v=tVRyb4HaHgw)

If you are looking for a great resource to not just improve your distributed system design skills but also to ace your distributed system design interviews and targeting level L5/L6 in companies like Facebook, Google, etc. then you should check “The Distributed System Design Interviews Bible”.

<a href="https://www.thinksoftwarelearning.com/?utm_source=dev-elevator" target="_blank"><img src="https://dev-to-uploads.s3.amazonaws.com/i/rt9de51qnzcit0w2fs8g.jpg"/></a>