Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

OOPS — Object Oriented Programming System

Focus more on Data

POP- procedure Oriented programming


• Focus more on Functions
Examples of Object-oriented Languages — Java, C++. Python
Examples of Procedure oriented Languages — C, BASIC, COBOL

PRINCIPLES OF OOPS

ENCAPSULATION
Wrapping up of Data Members and Member Functions into a single unit called
class.
2. DATA ABSTRACTION
Dealing only with relevant part and ignoring all background details.
3. INHERITANCE
Feature that allow a class (Derived, sub. child) to acquire the properties of
another class (Base. super, parent).
Advantage — Reusability of code
4. POLYMORPHISM poly means many. Morphism means forms. So Polymorphism
means one thing having many Forms'.
Achieved through Function Overloading.

CLASS
User defined type or Composite type Template.
• Blue print

Contains DATA MEMBERS (Attributes or Characteristics) and MEMBER FUNCTIONS


(Behavior)

Class is instantiated to create OBJECT of the class.


Object is therefore referred as Runtime Instance of the class.
The •new' keyword is used to allocate memory for the object as perthe following
syntax. Demo d = new Demo O; where Demo is a class and Demo O is the constructor.

You might also like