6 Steps To Approach Object-Oriented Design Questions in Interview

Parking Lot Design | Object Oriented Design Interview Question

Design Amazon / Flipkart: build an online shopping platform

An interviewer will be looking for the basic functionality of necessary features like signup and logic. They will also be assessing the following:

  • Discoverability: How will a buyer be able to discover a product? How will their search display results?
  • Cart & Checkout: Users expect a checkout process and virtual to behave a certain way. How will the frontend design adhere to these best practices while also implementing new or innovative checkout semantics?
  • Payment Methods: Users should be able to pay with credit cards, gift cards, etc. How will the payment method work? What new functionalities can be added to improve payment processes?
  • Product Reviews & Ratings: Ratings improve online shopping experiences. When and how can a user post a review or a rating? How will you track useful reviews and de-prioritize less useful reviews?
  • 10. What does it mean to override a method?

    When you create a class that inherits from another class, you can override the parent class’ methods. For example, if the parent Animal class contains the method move(), a child class such as Bird can either inherit the move() functionality from the parent or override it to something more specific to birds. If overriding is done, then the bird will have its own implementation for the move() method in its own class rather than inheriting the parent class Animal’s generic move behavior.

    Exception handling is a process used to trap the errors that can occur when your application is running. It allows users to continue using the software and gracefully handle issues rather than letting the application crash. For example, your browser application doesn’t crash if you lose connectivity to the internet. It just says “retry connecting” or something similar. This is an example of exception handling done correctly in the software. Exception handling is done to capture error scenarios that are outside of the developer’s control.

    How to approach OOD interview questions

    When it comes to Object Oriented Design interview questions, interviewers are trying to assess your nuanced understanding of complex problems and how you transform requirements into comprehensible classes and subclasses.

    OOD questions generally follow similar patterns. During the job interview, you will be given a vague design problem and a set of constraints. Then, you need to leverage your design skills to figure out the “level” of solution that the interviewer is looking for.

    You need to think about what functionality is needed and come up with a workable using design principles and a programming language of your choice.

    Interviewers care most about the right balance between a solution that works immediately that is adaptable and flexible to change in the future. To simplify things, you can take the following approach for any OOD question you encounter:

  • Clarify requirements: You need to what the interviewer expects of you. You should ask clarifying questions. The interviewer will likely appreciate it. Doing this at the start will save a tremendous amount of time later.
  • Hash out the primary use cases: Brainstorm and talk through the use cases of your design problem. Make sure you understand the functionality your system is expected to have.
  • Identify key Objects: Now, you want to identify all objects that will play a role in your software design solution. For example, if you’re designing a parking lot, these youll need to identify the vehicles, parking spots, parking garages, entrances, etc.
  • Identify Operations supported by Objects: Now with the objects youve identified, you need to think about their behaviors. For example, a car can move, park in a given spot, and display a license plate. And so on.
  • Identify Interactions between Objects: Map out the relationships between the objects that interact with each other. This is a really important step. For example, a car should be able to park in a parking spot. Parking garages should be able to fit multiple parking spots, and so on.
  • Now we will go over the top questions that I’d recommend practicing. I will also share some pointers about the main things an interviewer is looking for in your answers throughout the interview process.

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *