Docsity

Basic Concepts of Object-Oriented Programming (OOP), Cheat Sheet of Java Programming

Partial preview of the text

Download Basic Concepts of Object-Oriented Programming (OOP) and more Cheat Sheet Java Programming in PDF only on Docsity!

BASIC

CONCEPTS

OF OOP

BASIC CONCEPTS OF OOP(CONTD..)

1.OBJECTS

Objects are the small, self contained & modular units with a well defined boundary.

It’s a building block of OOP.

All objects takes a separate space in the memory independent of each other.

It contains:

⚫ State (possible conditions that an object can exist). ⚫ Behaviour (determines how an object acts or behaves).

BASIC CONCEPTS OF OOP(CONTD..)

3.ABSTRACTION

It hide irrelevant details & represents only the essential features.

Focuses on important things at a time.

2 types: ⚫ Data Abstraction-It hides the details about the data, hence ensures data security. ⚫ Control Abstraction-It hides implementation details.

BASIC CONCEPTS OF OOP(CONTD..)

5.INHERITANCE

An object of a class acquires characteristics from the object of another class.

The class which is inherited by the other classes called super class or base class or parent class.

The class which inherits the properties of the base class is called ‘subclass’ or ‘derived class’ or ‘child class’.

The main advantage of inheritance is reusability.

BASIC CONCEPTS OF OOP(CONTD..)

6.POLYMORPHISM

It is the ability of an entity,such as a function or msg to be processed in more than one form.

It also can defined as the property of an object belonging to a same or different class to respond to the same msg or function in a different manner.

BASIC CONCEPTS OF OOP(CONTD..)

8.DYNAMIC BINDING

It is the process of linking a function call to the actual code of the function at run time.

It is implemented with the help of inheritance & runtime polymorphism.

In dynamic binding,the actual code to be executed is not known to the compiler until runtime.