INTRODUCTION TO OOPs CONCEPT
Mrs.T.Krishnaveni, M.Sc., M.Phil.,
Assistant Professor,
Department of Computer Applications,
Ayya Nadar Janaki Ammal College,
Sivakasi,
Communication
Object C
Data
Functions
Functions
Data
Functions
Data
OOPS
"Object-oriented programming is an approach that allows programs to be modularized
by dividing up memory for functions and data, which can then be used as templates to create
copies of these modules whenever needed."
Object-oriented programming features
1. Emphasis is on doing rather than procedure.
2. Programs are separated into several categories called objects.
3. Data structures are made to describe the things they contain.
4. The data structure connects the functions that work with an object's data.
5. External functions are unable to access secret data.
6. Functions allow objects to speak to one another.
7. It is simple to add new functions and data.
8. Adopts a bottom-up strategy for designing programs.
BASIC CONCEPTS OF OBJECTS ORIENTED PROGRAMMING
1. Objects
2. Classes
3. Data abstraction and encapsulation
4. Inheritance
5. Polymorphism
6. Dynamic binding
7. Message passing
Objects
Objects serve as the fundamental run-time components in an object-oriented system.
They can symbolize a person, a location, a bank account, a dataset, or any item that the
program needs to manage. The core concept of the object-oriented approach is to integrate
both data and functionality into a single unit, referred to as objects. The term objects signifies
a combination of data and programming that represents a real-world entity. For instance,
consider an example named Amit; he is 25 years old and has a salary of 2500. In a computer
program, Amit can be modelled as an object. The data aspect of this object would be (name:
Amit, age: 25, salary: 2500).
Class
A class is a collection of objects that have common characteristics for both data and
some software components. Class variables and member functions that work with the
Object: Student
DATA
Name
Date-of-birth
Marks
FUNCTIONS
Total
Average
Display
Object: Student
DATA
Name
Date-of-birth
Marks
FUNCTIONS
Total
Average
Display
variables are part of a new data type in C++.
Data Abstraction
Representing key elements without incorporating background information or
justifications is known as abstraction. Classes define size, width, cost, and functions to work
on the characteristics using the abstraction principle.
Data Encapsulation
Encapsulation is the process of combining data and functionality into a single unit, or
class. Only functions that are wrapped in the class have access to the data; the outside world
cannot access it. The interface between the program and the object data is provided by these
functions.
Inheritance
The process by which objects of one class obtain the characteristics of another class is
known as inheritance. The idea of reusability is included in the concept of inheritance. This
implies that we can enhance an existing class with new features without changing it. This can
be achieved by creating a new class that combines the features of the two existing classes.
Polymorphism
The capacity to assume multiple forms is known as polymorphism. Different
instances may be displayed by an operation. The type of data utilized in the operation
determines the behaviour.
A feature of the language that permits many definitions for an operator or function. Here the
utilization depends on the kinds of arguments that are provided to invoke the function or
operator.
Operator overloading and function overloading are two types of overloading.
It can represent the addition operation with just one operator, such as "+." For many different
types of x and y, including integers, floats, and complex numbers, the notation x + y is used
to indicate the sum of x and y whenever this is feasible. To indicate the concatenation of two
strings, you may even define the + operator.
Dynamic Binding
The connecting of a procedure call to the code that is run in response to the call is
known as binding. With dynamic binding, the code linked to a particular procedure call is
unknown until the call is made at run-time. Depending on the dynamic type of the reference,
it is linked to a polymorphic reference.
Message Passing
A collection of objects that can communicate with one another makes up an object-
oriented application.
Since a message for an object is a request to execute a procedure, it will cause the receiving
object to execute a function (procedure) that produces the intended outcome. In message
passing, the object's name, the function's (message's) name, and the data to be transmitted are
all specified.
Employee . Salary (name)
Object Information
Message
Benefits of OOP
OOP has a number of advantages for both programmers and users. Many issues
pertaining to the creation and calibre of software products can be resolved with object-
oriented programming. The main benefits are:
1. We can extend the use of existing classes and remove unnecessary code using inheritance.
2. Rather of starting from scratch while writing the code, we can construct programs using
the standard working modules that communicate with one other. Higher productivity and a
reduction in development time result from this.
3. The data concealing approach aids programmers in creating safe programs that are
impenetrable by coding in other areas of the program.
4. Multiple instances of an object can coexist peacefully without interfering with one another.
5. Dividing a project's work according to objects is simple.
6. Upgrading object-oriented systems from small to large systems is simple.
7. Using message passing techniques to communicate between objects simplifies the
description of the interface with external systems.
8. Managing software complexity is simple.
Application of OOP
Up until now, the most common usage of oops has been in the design of user
interfaces, like Windows. Using oop approaches, hundreds of windowing systems have been
created.
Real-world business systems are frequently even more intricate, having many more
objects with intricate properties and functions. OOP can simplify a complicated problem,
which makes it helpful in these kinds of applications. The following are some promising
areas for OOP application.
1. Real Time systems.
2. Modelling and simulation
3. Object oriented databases.
4. Experttext, hypertext, and hypermedia.
5. Expert and Al systems.
6. Parallel programming and neural networks.
7. Office automation and decision support systems.
8. CAD, CAM, and CIM systems.

Introduction to OOPs Concept- Features, Basic concepts, Benefits and Applications

  • 1.
    INTRODUCTION TO OOPsCONCEPT Mrs.T.Krishnaveni, M.Sc., M.Phil., Assistant Professor, Department of Computer Applications, Ayya Nadar Janaki Ammal College, Sivakasi,
  • 2.
    Communication Object C Data Functions Functions Data Functions Data OOPS "Object-oriented programmingis an approach that allows programs to be modularized by dividing up memory for functions and data, which can then be used as templates to create copies of these modules whenever needed." Object-oriented programming features 1. Emphasis is on doing rather than procedure. 2. Programs are separated into several categories called objects. 3. Data structures are made to describe the things they contain. 4. The data structure connects the functions that work with an object's data. 5. External functions are unable to access secret data. 6. Functions allow objects to speak to one another. 7. It is simple to add new functions and data. 8. Adopts a bottom-up strategy for designing programs. BASIC CONCEPTS OF OBJECTS ORIENTED PROGRAMMING 1. Objects 2. Classes
  • 3.
    3. Data abstractionand encapsulation 4. Inheritance 5. Polymorphism 6. Dynamic binding 7. Message passing Objects Objects serve as the fundamental run-time components in an object-oriented system. They can symbolize a person, a location, a bank account, a dataset, or any item that the program needs to manage. The core concept of the object-oriented approach is to integrate both data and functionality into a single unit, referred to as objects. The term objects signifies a combination of data and programming that represents a real-world entity. For instance, consider an example named Amit; he is 25 years old and has a salary of 2500. In a computer program, Amit can be modelled as an object. The data aspect of this object would be (name: Amit, age: 25, salary: 2500). Class A class is a collection of objects that have common characteristics for both data and some software components. Class variables and member functions that work with the Object: Student DATA Name Date-of-birth Marks FUNCTIONS Total Average Display Object: Student DATA Name Date-of-birth Marks FUNCTIONS Total Average Display
  • 4.
    variables are partof a new data type in C++. Data Abstraction Representing key elements without incorporating background information or justifications is known as abstraction. Classes define size, width, cost, and functions to work on the characteristics using the abstraction principle. Data Encapsulation Encapsulation is the process of combining data and functionality into a single unit, or class. Only functions that are wrapped in the class have access to the data; the outside world cannot access it. The interface between the program and the object data is provided by these functions. Inheritance The process by which objects of one class obtain the characteristics of another class is known as inheritance. The idea of reusability is included in the concept of inheritance. This implies that we can enhance an existing class with new features without changing it. This can be achieved by creating a new class that combines the features of the two existing classes. Polymorphism The capacity to assume multiple forms is known as polymorphism. Different instances may be displayed by an operation. The type of data utilized in the operation determines the behaviour. A feature of the language that permits many definitions for an operator or function. Here the utilization depends on the kinds of arguments that are provided to invoke the function or operator. Operator overloading and function overloading are two types of overloading. It can represent the addition operation with just one operator, such as "+." For many different types of x and y, including integers, floats, and complex numbers, the notation x + y is used
  • 5.
    to indicate thesum of x and y whenever this is feasible. To indicate the concatenation of two strings, you may even define the + operator. Dynamic Binding The connecting of a procedure call to the code that is run in response to the call is known as binding. With dynamic binding, the code linked to a particular procedure call is unknown until the call is made at run-time. Depending on the dynamic type of the reference, it is linked to a polymorphic reference. Message Passing A collection of objects that can communicate with one another makes up an object- oriented application. Since a message for an object is a request to execute a procedure, it will cause the receiving object to execute a function (procedure) that produces the intended outcome. In message passing, the object's name, the function's (message's) name, and the data to be transmitted are all specified. Employee . Salary (name) Object Information Message Benefits of OOP OOP has a number of advantages for both programmers and users. Many issues pertaining to the creation and calibre of software products can be resolved with object- oriented programming. The main benefits are: 1. We can extend the use of existing classes and remove unnecessary code using inheritance. 2. Rather of starting from scratch while writing the code, we can construct programs using the standard working modules that communicate with one other. Higher productivity and a reduction in development time result from this. 3. The data concealing approach aids programmers in creating safe programs that are impenetrable by coding in other areas of the program.
  • 6.
    4. Multiple instancesof an object can coexist peacefully without interfering with one another. 5. Dividing a project's work according to objects is simple. 6. Upgrading object-oriented systems from small to large systems is simple. 7. Using message passing techniques to communicate between objects simplifies the description of the interface with external systems. 8. Managing software complexity is simple. Application of OOP Up until now, the most common usage of oops has been in the design of user interfaces, like Windows. Using oop approaches, hundreds of windowing systems have been created. Real-world business systems are frequently even more intricate, having many more objects with intricate properties and functions. OOP can simplify a complicated problem, which makes it helpful in these kinds of applications. The following are some promising areas for OOP application. 1. Real Time systems. 2. Modelling and simulation 3. Object oriented databases. 4. Experttext, hypertext, and hypermedia. 5. Expert and Al systems. 6. Parallel programming and neural networks. 7. Office automation and decision support systems. 8. CAD, CAM, and CIM systems.