0% found this document useful (0 votes)
13 views3 pages

OOPS Notes

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 3

OBJECT-ORIENTED PROGRAMMING

OOPS Definition
Object oriented programming is the principle of design and development of programs
using modular approach.
Some of the examples of OOPs: JAVA, C++,C#, .NET etc.

Basic concepts of Object oriented programming/characteristics of


OOPs
Following are the major characteristics of object-oriented programming language.
 Object
 Classes
 Data abstraction
 Data encapsulation
 Overloading
 Polymorphism
 Inheritance
 Dynamic binding
 Message passing.
OBJECT:
 Definition: object is an instance of a class

CLASS:
 A class is a way of grouping objects having similar characteristics.
 Once a class is defined, any number of objects of that class are created.
 Classes are user defined data types. A class can hold both data and functions.

DATA ABSTRACTION
 Data Abstraction refers to the act of representing essential features without
including the back-ground details. .
ENCAPSULATION
 The binding up of data and functions into a single unit is known as encapsulation.

INHERITANCE
 Inheritance is the process by which objects of one class acquire the
properties of objects of another class.
 The class that inherits the properties from another class is known as derived class
or sub class.
 Base class: The class whose properties are inherited by another class
 Each derived class shares common characteristics with the class from which it is
derived.
POLYMORPHISM
 Poly means “many”, morphism means “different forms”
 It is defined as ability to take more than one form
 Using a single function name to perform different types of tasks is known as
function overloading.
 add( 3, 5) gives 8
 add(“hello”, “-world”) gives “hello-world”

DYNAMIC BINDING
Binding means link between procedure call and code to be executed
 Static binding means that code associated with a given procedure call is known at
compile time itself.
 Dynamic binding means that the code associated with a given procedure call is not
known until the time of call at run-time.
MESSAGE PASSING
 it is a technique that allows one object to communicate with another object in OOPs.
 A message for an object is a request for execution of a procedure.
 Invoke a function(procedure) in the receiving object that generates the desired
result.
 Message passing involves:
1. Specifying name of the object.
2. Name of the function(message).
3. Information to be sent.

employee. salary(name)

object message information

ADVANTAGES OF OBJECT-ORIENTED PROGRAMMING


 The programs are modularized based on the principle of classes and objects
 Data hiding helps the programmer to build secured programs.
 Reduces software development time.
 Data is encapsulated along with the functions.
 Message passing helps one object to communicate with other object.
 Reduces code duplication and code reusability.
 Object-oriented systems can be easily upgraded from small to large systems.
 Software complexity can be easily managed.

DISADVANTAGES/LIMITATIONS OF OOPS
 OOP software is not having set standards.
 The classes are over generalized.
 It requires tricky method of programming.
 Proper planning is needed before doing the actual program.
 Time consuming and requires a lot of mental skill for programmer.
 To convert real world problem into object oriented model is difficult.

APPLICATIONS OF OOPS.
 Computer Graphic applications
 Object-oriented databases
 Image processing
 Pattern recognition
 Web-based applications
 Mobile computing
 Parallel computing and neural networks
 Real time systems
 CAD/CAM software
 Simulation and modelling
 User interface designs like windows
 Artificial Intelligence and expert system.

DIFFERENCE BETWEEN PROCEDURE ORIENTED PROGRAMMING


AND OBJECT ORIENTED PROGRAMMING
POP OOP

Program is divided into smaller parts Program is divided into parts called
called functions methods.

Program is divided into parts called Importance is given to data rather than
methods. procedures.

It follows top down approach It follows bottom-up approach

It does not have any access specifier It has 3 access specifier namely private,
public and protected.

Overloading is not possible Overloading is possible in the form of


function and operator overloading.

It is less secure for hiding data Provides more security for hiding data

Example: C, FORTRAN Example: C++,JAVA, .NET, Python

You might also like