DESIGN_PRINCIPLE

Abstract Factory Pattern

Introduction Abstract Factory Pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes. This pattern is almost similar to Factory Pattern, is considered as another layer of abstraction over Factory pattern. Abstract Factory patterns work around a super-factory which creates other factories. It [...]

2020-05-04T20:11:14+05:30Categories: Programming|Tags: |

Factory Method Pattern

Introduction Factory Method Pattern defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. In Factory pattern, we create object without exposing the creation logic to client and the client use the same common interface to [...]

2020-05-04T19:25:52+05:30Categories: Programming|Tags: |

Commonly Used Design Principles in OOP

In object oriented programming (OOP), SOLID is a mnemonic acronym for below five design principles intended to make software designs more understandable, flexible and maintainable. Single Responsibility Principle Open/Closed Principle Liskov Substitution Principle Interface Segregation Principle Dependency Inversion Principle Single Responsibility Principle This principle states that a class should have [...]

2024-04-26T16:34:22+05:30Categories: Programming|Tags: |

OOPS Design Questions

Design an online hotel booking system like OYO Rooms Design a movie ticket booking system like Bookmyshow Object Oriented Design of Juke Box Design a Vending Machine in Java Design a valet parking system Design Coffee Shop Design vector graphics application Object oriented design for an online auction site Relate [...]

2024-04-17T23:21:11+05:30Categories: Interview|Tags: |

Composition vs Inheritance

Inheritance It is the design technique in object oriented programming to implement Is-A relationship between objects. Inheritance in Java is implemented using extends keyword. class Fruit { } class Apple extends Fruit { } Class Apple is related to class Fruit by inheritance, because Apple extends Fruit. In this example, [...]

2020-05-04T19:19:53+05:30Categories: Programming|Tags: |

UML Class Diagram And Notations

Introduction Unified Modeling Language (UML) notations are used in modeling. Efficient and appropriate use of notations is very important for making a complete and meaningful model. The model is useless, unless its purpose is depicted properly. Class Notation UML class is represented by the following figure. The diagram is divided [...]

2024-04-19T23:04:44+05:30Categories: Programming|Tags: |

Decorator Pattern

Introduction Decorator pattern allows a user to add new functionality to an existing object without altering its structure. This type of design pattern comes under structural pattern as this pattern acts as a wrapper to existing class. This pattern creates a decorator class which wraps the original class and provides [...]

2024-04-26T16:53:25+05:30Categories: Programming|Tags: |

Desigining of Recommendation Systems

Typical components in ecommerce recommendation system include identification of primary driver items and the identification of affinity items Purchased shopping carts items. Items added to carts but abandoned. Pricing experiments online where they offer the same products at different prices and see the results. Wishlists - what's on them specifically [...]

2020-05-23T13:17:41+05:30Categories: Interview|Tags: |

Answering System Design Questions

System design questions are usually open-ended. As long as your approach is reasonable and you're able to compare pros and cons of different options, your performance can't be bad. Below are the systematic approach for answering system design questions. Gather Requirement Design questions are intentionally vague in order to test [...]

2024-07-22T10:20:09+05:30Categories: Programming|Tags: |
Go to Top