OOPS Notes
OOPS Notes
OOPS Notes
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.
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)
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.
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 does not have any access specifier It has 3 access specifier namely private,
public and protected.
It is less secure for hiding data Provides more security for hiding data