oops-concepts

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
Method Overloading in OOPS (Java)

Java language has a feature called method overloading, which allows multiple methods within a class to have the same name with different argument lists. It is a type of polymorphism (the process by which we can perform a single task in various ways). To be more concise, overloading is an example of static polymorphism.

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
Introduction to Constructors in Java

In oops, we may want our object to get initialized with some specific properties, or we may need to do some operations every time an object is instantiated. To do such things, we use constructors. In simple words, a constructor is defined inside the class that contains the code to instantiate the class object.

Blog Cover Image
Classes and Objets in Object Oriented Programming (OOP)

A class is a user-defined blueprint that describes what a specific kind of object will look like, but an object is an instance of a class, which contains data and methods working on that data. In simple words, classes and objects are the fundamental building blocks of Object-Oriented Programming (OOPS).

Blog Cover Image
Abstraction in Object Oriented Programming (OOPS)

In OOPS, Abstraction exposes necessary functionality to external objects and hides implementation details. This helps programmers to use complex logic without understanding its implementation. In other words, Abstraction is a process of exposing relevant functionalities so that one needs to know what the code does, not how it does it.

Blog Cover Image
Encapsulation in Object Oriented Programming (OOPS)

Encapsulation is one of the fundamental concepts in OOP that bundles data and associated methods that operate on that data into a single block called class. It is also a pathway for restricting direct access to some data and methods associated with a class (which leads to data hiding).

Blog Cover Image
Singleton Design Pattern

There might be some objects common to all parts of the program, and we require a single instance of it. The Singleton is a creational design pattern that ensures that a class has only one instance throughout the application. This instance is accessible from any part of the application with global access.

Blog Cover Image
Object Oriented Programming (OOPS) Concepts in Java

Learning Object-Oriented Programming is essential for modern software development as it introduces many features such as Inheritance, Encapsulation, Abstraction, and Polymorphism. Besides reducing code complexity, the oops provide other advantages like code modularity, code reusability, code extensibility, data hiding, etc.

Blog Cover Image
Object Oriented Programming (OOPS) Concepts in C++

Object-Oriented Programming binds together the data and the methods in the form of an object and selectively exposes the data to other objects. It primarily revolves around classes and objects, i.e., their definition, instantiation, relationship, communication, etc. It helps us to organize code and development processes for large-scale software.

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
Factory Method Design Pattern

The factory method is a creational design pattern in which we define a superclass for creating an object but let the subclasses decide which class to instantiate. Therefore, the factory method enables a class to delegate instantiation to its subclasses and eliminates the coupling of concrete products to the Client code.

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.

Blog Cover Image
Principles of Object-Oriented Programming (OOP)

Learn the four pillars of object-oriented programming: Abstraction, Encapsulation, Inheritance, and Polymorphism.

Blog Cover Image
Important C++ Concepts in Programming

This blog has discussed critical C++ concepts related to dangling pointers, bad pointers, memory leak, static memory, dynamic memory, reference variable, const and volatile keywords, template, etc.

Blog Cover Image
Why should we learn Object Oriented Programming?

Modern Softwares usually consists of millions of lines of code and operates on terabytes of data, and is so complex that not a single person understands it all. Hence we need a way to organize these instructions so that it is: Easier to understand and explain, Easier to reuse and extend, Easier to maintain. And Object-Oriented Programming(OOP) has been one of the most popular paradigms used in the last few decades for this purpose.

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.