oops-principles

Blog Cover Image
Inheritance in Object Oriented Programming (Java)

Inheritance is one of the core principles of object-oriented programming (OOP), which help us derive a class from another class or a hierarchy of classes that share a set of attributes and methods. In other words, it is a relationship between a superclass (a more generalised class) and a subclass (a more specialised class), where the subclass inherits data and behavior from the superclass.

Blog Cover Image
SOLID Principle Part 5: Dependency Inversion Principle

The Dependency Inversion Principle (DIP) states that high-level modules should not depend on low-level modules; both should depend on abstractions. This abstraction removes the direct dependency on the details, decoupling it and thus allows for easier re-use of the important functionality in the policy.

Blog Cover Image
SOLID Principle Part 4: Interface-Segregation Principle

The Interface Segregation Principle states that a client should never be forced to depend on methods it does not use. We achieve this by making our interfaces small and focused**. It would be best to split large interfaces into more specific ones focused on a particular set of functionalities so that the clients can choose to depend only on the functionalities they need.

Blog Cover Image
Builder Design Pattern

The Builder is a creational design pattern that allows us to follow a step-by-step process to construct a complex object. Builder design pattern separates the construction of the complex object from its representation by which the same process can create different representations (types) of the complex object.

Blog Cover Image
SOLID Principle Part 3: Liskov Substitution Principle (LSP)

According to the Liskov Substitution principle, an object of a parent/base class must be interchangeable with an object of a child/derived class without changing the program. So the subclass objects should behave in the same way as the superclass objects. In simple words, LSP is all about well-designed inheritance.

Blog Cover Image
SOLID Principle Part 2: Open Closed Principle

In object-oriented programming, the open-closed principle states: software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification"; that is, such an entity can extend its behavior without modifying its source code. This principle allows us to use the power of abstraction and inheritance to create such systems.

Blog Cover Image
Principles of Software Engineering

To write clear and maintainable code, software engineering principles are recommendations that programmers should follow during software development. It is a set of approaches and best practices introduced by some famous industry experts and authors. This blog will go through some popular software engineering principles for developing quality software.

Blog Cover Image
SOLID Principle Part 1: Single Responsibility Principle (SRP)

The single responsibility principle is one of the popular SOLID principles in software engineering that determines how we should modularize code in object-oriented programming. The idea for this principle is relatively simple: it makes our software easier to implement and prevents unexpected side-effects of future changes.

Our weekly newsletter

Subscribe to get free weekly content on data structure and algorithms, machine learning, system design, oops design and mathematics.

Follow us on:

LinkedinMedium

© 2020 EnjoyAlgorithms Inc.

All rights reserved.