Approach ObjectOriented Design Questions in Interview (original) (raw)

Approach Object-Oriented Design Questions in Interview

Last Updated : 29 Apr, 2026

Object-Oriented Design (OOD) is an important interview topic at companies like Google, Microsoft, Amazon, and Facebook. Candidates are asked to design a system using OOP principles by identifying objects, relationships, and creating a scalable structure. It evaluates both design thinking and understanding of core OOP concepts.

**Example: For a Library Management System, identify objects like Book, User, and Library, define their attributes and methods, and design how they interact (e.g., issue and return books).

Preparation Before the Interviews

**1. We should have a good command of one object-oriented programming language such as Java/C++/Python etc. Have some experience in it and learn how the OOPs concepts work in these languages.

**2. Understand the various object-oriented design principles such as SOLID/DRY principles etc.

**3. If you have a good command of various design patterns such as MVC, singleton, factory method, etc then it will be a bonus point for you as an entry-level developer or senior-level developer.

Step-by-Step Process to Approach The Problem

Break the problem into smaller parts and systematically design each component to build a clear and structured solution.

1. Requirement Gathering

First, identify whether the interview is focused on system-level design or object-level design, as the approach differs for each. Begin by gathering requirements based on the high-level problem description given by the interviewer and clarify the exact scope by asking relevant questions. Ensure you clearly understand the expected features and output.

**Example: an online shopping system.

2. Use Case Diagram

While discussing the requirement you must have identified all the use cases that you need to include in your design. List all the use cases your system is supposed to design. You will be able to identify the different components and actors you need to include in your system.

Now you need to transform that into the Use Case Diagram. Below is the use case for the online shopping system.

registered_customer

Use Case Diagram

3. Activity Diagram

Once you identified the actors and the role of each actor, focus on the logic, complete structure, and the overall flow of the system. Write down the flow diagram. This will help you to understand the problem clearly and you will have the chance to rectify your mistakes. Below is the activity diagram for the online shopping system.

odd_2

Activity Diagram

4. Class Diagram

This is the most critical part of the interview process, where the interviewer evaluates your design thinking and problem-solving approach. By this stage, you already have the necessary components such as system actors and objects to start building your class diagram.

odd_1

Class Diagram

5. Describe Top Use Cases

Use the class defined in the above step and run the top use cases. This is similar to the activity diagram. This will help you if you have missed out on any components or scenarios. You need to explain this verbally to the interviewer.

6. Code

The coding part is optional in this round but the interviewer may ask you to write the code for a specific feature or component. In case if you're asked to write the code prioritize the things given below.

The interviewer evaluates both design clarity (interfaces, structure, extensibility) and implementation correctness (working logic, clean code, and basic test cases)