Facade Design Pattern
Facade Design Pattern

In object-oriented programming, Facade is a structural design pattern that simplifies the interaction between the client and complex subsystem. For this, we design a facade class that works as an interface between the client and interdependent classes in the subsystem. In other words, the facade class is a wrapper class, which encapsulates the complexity of the subsystem.

How to Gather Requirements and Write Use Cases for a Software?
Requirements Gathering and Writing Use Cases for a Software

Requirement gathering is the process of collecting and documenting the needs, expectations, and constraints of stakeholders to develop software. On the other hand, Use cases are used in software development to capture and describe the functional requirements of a system. In this blog, we will discuss how to capture requirements properly and write good use cases for developing good software.

Message Passing in Object Oriented Programming (OOP)
Message Passing in Object Oriented Programming (OOP)

We use the idea of message passing in both object-oriented programming as well as concurrent programming. In OOPS, message passing is a way for objects to communicate within a program. Similarly, in concurrent programming, we use it to communicate messages between processes or threads. In this blog, we will discuss how message passing works in OOPS.

Proxy Design Pattern in OOPS
Proxy Design Pattern in OOPS

In object-oriented programming, Proxy is a structural design pattern that provides a placeholder for another object to control its access. Here proxy object works as an intermediary between the client and the real object so that the client will interact with the proxy instead of the real object.

Cohesion and Coupling in Object Oriented Programming (OOPS)
Cohesion and Coupling in Object Oriented Programming (OOPS)

In object-oriented programming (OOP), the concepts of cohesion and coupling are used to assess the quality of code and ensure it is maintainable and scalable. Cohesion and coupling are interdependent concepts and the goal is to attain high cohesion and low coupling. This will improve the overall maintainability, scalability, and readability of the code.

SOLID Principle Part 2: Open Closed Principle (OCP)
SOLID Principle Part 2: Open Closed Principle (OCP)

In object oriented programming, open closed principle states that: software entities (classes, modules, etc.) should be open for extension but closed for modification i.e. 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.

SOLID Principle Part 1: Single Responsibility Principle (SRP)
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.

Introduction to Constructor in Java (OOPS)
Introduction to Constructor in Java

In object oriented programming, 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 object of a class in java.

Operator Overloading in C++
Operator Overloading in C++

Operator overloading is a compile time polymorphism that allows us to extend the meaning of an operator to operate on a user-defined data type. The main advantage of operator overloading is that we can have different implementations of an operator based on the argument type. Here we will learn how to implement and overload various operators.

Inheritance in OOPS: An Idea of Code Reusability
Inheritance in Object Oriented Programming (Java)

Inheritance is one of the core principles of object oriented programming (OOP), which helps us derive a class from another class or a hierarchy of classes that share a set of attributes and methods. It is a relationship between a superclass (parent class) and a subclass (child class), where subclass inherits data and behavior from superclass.

Abstraction in Object Oriented Programming (OOPS)
Abstraction in Object Oriented Programming (OOPS)

Abstraction is a process of exposing necessary functionality to external objects and hiding implementation details. This helps programmers to use complex logic without understanding its implementation. So one needs to know what code does, not how it does it. There are two types of abstraction in oop: data abstraction and control abstraction.

What is Encapsulation in OOPS?
Encapsulation in Object Oriented Programming (OOPS)

In OOPS, Encapsulation is one of the basic concepts that bundles data and methods into a single block called class. It is a pathway for restricting direct access to some data and methods (which leads to data hiding). In other words: Encapsulation is about wrapping data and methods into a single class and protecting it from outside intervention.

Introduction to Object Oriented Programming in Java
Introduction to Object Oriented Programming in Java

Learning oops is essential for modern software development as it introduces features like inheritance, encapsulation, abstraction, and polymorphism. Besides reducing code complexity, oops provide advantages like modularity, reusability, extensibility, data hiding, etc. This blog has covered a fundamental overview of oops concepts in java.

Principles of Object Oriented Programming (OOPS)
Principles of Object Oriented Programming (OOPS)

Abstraction, Encapsulation, Inheritance, and Polymorphism are four fundamental principles of object oriented programming. These oops principles provide advantages like modularity, code reusability, feature extensibility, data hiding, etc. In this blog, we will learn how the four main oop principles work together to make a well-designed application.

Why do we need to learn Object Oriented Programming?
Why do we need to learn OOPS Concepts?

Modern software usually consists of millions of lines of code and operates on terabytes of data. So we need a way to organize a large code base to make it easier to understand, explain, reuse, extend and maintain. That's why we need object oriented programming (OOP). It has been one of the most important paradigms used in the last few decades.

Abstract Factory (A Creational Design Pattern in OOPS)
Abstract Factory Design Pattern

Abstract Factory is a creational design pattern that helps in providing an interface for producing families of related objects (products) without specifying their concrete classes. It is a hierarchy of classes that encapsulate many possible “platforms” and provide an interface for the construction of a suite of products.

Introduction to OOPS in Python
Introduction to Object Oriented Programming in Python

Just like other programming languages, we use OOPS in Python to write modular, reusable, and extensible code. In Python, everything is an object that holds different properties and methods, whereas the class is a blueprint that creates these objects. In this blog, we will discuss the basic OOP concepts in Python: Classes and Objects, types of methods, and types of attributes in Python.

Abstract Class: An Idea to Implement Abstraction in Java
Abstract Class in Java

In Java, abstraction is implemented using abstract class and interface. An abstract class is similar to any other class declared with the abstract keyword, and one can never instantiate an abstract class. Here we have discussed: 1) What is abstract class? 2) Why do we need abstract classes? 3) Abstract Methods 4) How to extend abstract class?

Interface in OOPS (Java)
Interface in OOPS (Java)

The word interface means a medium or means of communication between two entities. Similarly, in object oriented programming, interfaces are used to ease the communication between classes and objects. An interface in java looks similar to class and contains only constants, method signatures, default methods, and static methods.

Exception Handling in Java Programming
Exception Handling in Java

Exception handling is one of the most important features of java programming that allows us to handle runtime errors caused by exceptions. An exception is an event that occurs during the execution of a program and disrupts the expected flow of the program. In this blog, we will learn exception types, classes and how to handle exceptions in java with examples.

Difference Between Compile-time and Runtime Polymorphism
Compile-time Polymorphism vs Runtime Polymorphism in Java

In OOP, Polymorphism allows us to code to an interface and has multiple implementations, making the code better. There are two types of polymorphism in java: compile-time and runtime. The compile time polymorphism is implemented using method overloading, and runtime polymorphism is implemented via method overriding.

Difference Between Class and Structure in C++
Class vs Structure in C++

Classes and structures are fundamental building blocks of object oriented programming C++. Although classes and structures have the same type of functionality, there are a few differences between them based on their definition and use cases. The data members of a class are private by default and the members of a structure are public by default.

SOLID Principle Part 5: Dependency Inversion Principle (DIP)
Dependency Inversion Principle (DIP)

The Dependency Inversion Principle (DIP) in software engineering states that high-level modules should not depend on low-level modules. In other words, both should depend on abstractions. This abstraction removes the direct dependency on the details, decouples them and allows for easier reuse of the important functionality in the policy.

Method Overloading: Static Polymorphism in Java
Method Overloading in OOPS (Java)

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

SOLID Principle Part 4: Interface Segregation Principle (ISP)
Interface Segregation Principle (ISP)

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

Classes and Objects in Object Oriented Programming
Classes and Objects in OOPS

Classes and objects are fundamental building blocks of object oriented programming (OOP). A class is a user-defined blueprint that describes what a specific kind of object will look like, but object is an instance of a class which contains data and associated methods working on that data. Memory is allocated when a class is instantiated.

Singleton Design Pattern in OOPS
Singleton Design Pattern in OOPS

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

Introduction to OOPS Concepts in C++
Introduction to OOPS Concepts in C++

Object-oriented programming is a widely-used programming paradigm in many modern programming languages, including C++. It is based on the concept of objects and classes. OOPS in C++ also supports several key concepts, such as encapsulation, inheritance, and polymorphism, that help to structure and organize code for large-scale software development.

SOLID Principle Part 3: Liskov Substitution Principle (LSP)
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.

Factory Pattern (A Creational Design Pattern in OOPS)
Factory Method Design Pattern

The factory method design pattern 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.

Popular Principles of Software Engineering
Popular Software Engineering Principles

Principle of software engineering are recommendations for developers to follow during software development. They are good practices for writing extensible, modular, reusable, and maintainable code. Some popular principles of software engineering are Separation of Concerns, Law of Demeter, KISS principle, YAGNI Principle, SOLID Principles, etc.

Concept of Pointers and Memory in C++ Programming
Pointers and Memory in C++ Programming

In this blog, we have discussed critical C++ programming concepts related to dangling pointers, bad pointers, memory leaks, static memory, dynamic memory, reference variable, const and volatile keywords, template, etc. We have also provided various code examples and scenarios of possible bugs to understand each concept in C++.

EnjoyAlgorithms Newsletter

Subscribe to get well designed content on data structure and algorithms, machine learning, system design, object orientd programming and math.

Follow us on

©2023 Code Algorithms Pvt. Ltd.

All rights reserved.