OOPS

Object

Object is a real world entity.

mermaid-diagram-20220523183442

Defines the type of data.

User Defined Data-Types

Basic example:

C

struct Employee {
  char name[200];
  int age;
  float salary;
}

struct Employee employee

C++

class Employee {
  string name;
  int age;
  float salary;
};

Object & Instances

“Names given to object are instances.”

References & Pointers

Types of memory:

Characterstics of an object

Abstraction

Abstraction allows to layer the semantics of a complex system into more manageable pieces.

It is achieved using the abstract keyword in Java or virtual functions / pure-virtual-functions in C++.