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.

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.

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.

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.

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.

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.

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.

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.

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.