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

Characteristics of Object-Oriented languages.

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Objects
• OOP uses objects as its fundamental building blocks.
• Objects are the basic run-time entities in an object- oriented system.
• Every objectis associated with data and functions which define
meaningful operations on that object.
• Object is a real world existing entity.
• Object is an Instance of a particular class.

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Object

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Example: Student Object

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

• Class is a collection of similar objects.


• Mango, Apple etc. are objects and their class is Fruit

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Example:
• class Dog
• {
• char name[20];
• char color[10];
• public:
• void details(){}
• };

• int main()
• {
• Dog obj; // obj is a object
• }

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Encapsulation:
• Wrapping up of data and functions into a single unit
(class) is called encapsulation.
• Data is not accessible to outside world.
• Only those functions which are wrapped in the class can
access it.

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Data Abstraction:
• A data abstraction is a simplified view of an object that
includes only features one is interested in while hides away
the unnecessary details.
• Data abstraction becomes an abstract data type
• (ADT)or a user-defined type.

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

• Abstraction is the essential characteristics of object oriented programming


because it hides complex details from users and provides them the flexibility
to change things.
• Without abstraction, it is difficult to add functionality without affecting
others, and high complexity arises because of large code bases.

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

• There are two types of abstraction.


• Data Abstraction
• Process Abstraction
Data Abstraction:
• When the object data is not visible to the outer world, it creates data
abstraction. If needed, access to the Objects’ data is provided through some
methods.
Process Abstraction:
We don’t need to provide details about all the functions of an object. When we
hide the internal implementation of the different functions involved in a user
operation, it creates process abstraction.

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Inheritance
• Inheritance is the mechanism to provides the power of
reusability and extendibility.
• Inheritance is the process by which one object can
acquire the properties of another object.

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Inheritance
• Super Class: The class from which the properties are inherited by the sub
class/child class.
• Sub Class: The class which inherits the properties from the super class/parent
class.
• Inheritance helps you do the separation of the same fields and functionality
so that it can be reused in other classes. And this helps in code redundancy.

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Polymorphism
• Poly means many. Morphism means forms.
• Polymorphism means that the same thing can exist in two forms.
• Polymorphism is in short the ability to call different functions by just using
one type of function call.
• Ex : Bank can be used as - bank (river)
•- bank (finance)

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

Message Passing
• Information or message of one object can be sent to other object.
• Object communicate with one another by sending and receiving
information much the same way as people communicate with each other.
• A message for an object is a request for execution of a procedure and it will
invoke a procedure in receiving object that generates the desired result.
• Message passing involves specifying the name of the object, the name of
the function and the information to be sent.
• Ex- employee.salary(name);

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

• Data Binding
• Binding means to bind one thing to another one. Here in OOPS, binding
refers to linking some attribute of one object to another one in the
Application.
• There are two main types of binding:
• Static Binding
• Dynamic binding

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Characteristics of object-oriented languages.

• Static Binding
• In static binding, the property of one object is changed directly without
changing the other property.
• Dynamic Binding
• When any object is determined at the run time, then it is known as dynamic
binding.
• Dynamic Binding occurs when the property of one object changes, and due to
this, the property of another object gets changed

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Benefits of OOP.

• Through inheritance we can extend the use of existing classes.


• Build secure program by data hiding.
• Message passing techniques for communication between objects make is
much simplier.
• It is easy to partition the work in a project based on object.

Dr.J.saira banu , Associate Professor, SCOPE, VIT University


Applications of OOP

• Database management systems


• Data security
• Artificial intelligence and expert systems
• Mobile computing
• Real time systems
• Simulation and modeling
• Distributed computing

Dr.J.saira banu , Associate Professor, SCOPE, VIT University

You might also like