Object Oriented Programming Features

Object Oriented Programming System

 

The Computer Programming model, which uses objects and classes in its design, rather than relying on functions and procedures is called Object Oriented Programming(OOP). OOP works on data called object. An object is a combination of data and methods. The objects having similar properties can be grouped together to form classes. An Object is a real world entity while class is just a logic entity. Java is an object oriented programming language, so before discussing Java let us understand what is object oriented programming is-

Features of Object-oriented Programming

Object Oriented Programming
Object Oriented Programming

Procedure Oriented programming just deals with functional parts of the problem. Programmers need to identify what actions must be taken to solve the problem, step wise step. In other words, the whole focus in on function/procedures.

The Object Oriented Programming approach works on the objects which is data. Which is much closer to real world problems.

In object-oriented model, a problem is viewed in terms of the following concepts:

  1. Objects
  2. Classes
  3. Data abstraction
  4. Data encapsulation
  5. Inheritance
  6. Polymorphism
  7. Dynamic binding
  8. Message communication

 

1  Objects

 Objects are the basic run-time entities in an object-oriented system. They may represent a person, a place, a bank account, a table of data; they may also represent user-defined data such  as vector, time and lists.

 Each object contains data(attributes) and code to manipulate the data (methods). Objects can interact without having to know details of each other data or code.

Object Oriented Programming
Object Oriented Programming

2  Classes

 A class represents a set of related objects. The object having similar attributes can be grouped as a class. The class of an object defines what attributes an object has. The entire  set of data and code of an object can be made a user-defined data type with the help of a class.

So, Classes are user defined data types that behave like the built-in types of a programming language. Classes also have an interface which defines which part of  an object of a class can be accessed from outside.

 A class body is used to run the operations in the interface, and the instance variables contain the state of an object of that class.

The data and the operation of a class can be declared as one of the three types:

  1. Public: These are declarations that are accessible from outside the class to anyone who can access an object of this class.
  2. Protected: These are declarations that are accessible from outside the class to anyone who can access an object of this class.
  3. Private: These are declarations that are accessible only from within the class itself.

 

3  Data Abstraction

Abstraction refers to the act of representing essential features without including the background details or explanations. Abstraction is indispensable part of the design process and is essential for problem partitioning. Partitioning is an exercise which help us in determining  the components of the system. These components can however, interact with each other. Since the classes use the concept of data abstraction, hence called as Abstract Data Types (ADT).

 

4 Data Encapsulation

The wrapping up of data and functions into a single unit (as a class) is known as encapsulation. Data encapsulation is one of the most important feature of a class. The data is not accessible to the outside world and only those methods that are wrapped in the class can access it. These methods provide the interface between the object’s data and the program. This insulation of the data from direct access by the program is called data hiding

5  Inheritance

Inheritance is the process by which objects of one class acquire the properties of objects of another class. It supports the concept of hierarchical classification. For example, a manager class is a type of the class employee, which again is a type of the class person as illustrated below.

In OOP, the basic idea behind the inheritance is re-usability. Using inheritance we can add additional features to an existing class without modifying it by deriving a new class from the existing one. The new class will have the combined features of both the classes. Each subclass defines only those features that are unique to it.

 

6  Polymorphism

Polymorphism means the ability to take more than one form. An operation may exhibit different behavior in different instances. The behavior depends upon the types of the data used in the operation.

The process of making an operator to exhibit different behavior at different instance is called operator overloading. Another example of polymorphism is function overloading, where a single function can perform various different types of task.

7  Dynamic Binding

Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding means that the code associated with a given procedure call is not known until the time of call at run-time. It is also called late binding. This is associated with polymorphism and inheritance. A function call associated with a polymorphic reference depends on the dynamic type of that reference.

8  Message Communication

Message communication is another feature of object-oriented programming which enables the a set of objects to communicate with each other. The concept of message communication makes it easier to talk about building systems that directly model or simulate their real-world counter-parts.

A message for an object is a request for execution of a procedure, and therefore will invoke a function in the receiving object that generates the desired result. Message communication involves specifying the name of the object, the name of the function (message) and the information to be sent.

 Benefits of OOP

There are several benefits of OOP to both program designer and the user. Object orientation solve many problems which are associated with the development and quality of software products. New technology gives greater programmer productivity, good quality of software and low maintenance cost. The main advantages are:

  • We can eliminate redundant code and extend the use of existing classes with the help of inheritance.
  • Programs can be build from the standard working modules that communicate with one another and to start writing the code from scratch. This shows to saving of development time and higher productivity.
  • The data hiding rules helps the programmer to make secure programs that cannot be invaded by code in other parts of the program.
  • It has multiple objects to coexist without any interference.
  • It has map objects in the problem domain to those objects in the program.
  • Partition of work is easy in a project based on objects.
  • The data-centered design approach capture more details of a model in an implementable form.
  • Object-oriented systems can be easily upgraded from small to large systems.
  • For communication, message-passing techniques between objects make the interface description with external systems much simpler.
  • It is possible to easily manage software complexity.

Above said features can be incorporated in an object-oriented system, their importance depends on the type of project and the preference of the programmer. Various issues need to be tackled to some of the benefits stated above.

Applications of OOP

There is great excitement among software engineers in using OOP. In many years, applications of OOP are gaining importance because it can simplify a complex problem. Some of the application areas of OOP includes:

  • Real-time systems
  • Simulation and modeling
  • Hypertext, hypermedia and expertext
  • AI and expert systems
  • Neural Networks and Parallel programming
  • Decision Support System
  • Office Automation System
  • CAM/CAE/CAD system

The richness of OOP environment enables the software industry to improve not only the quality of software system but also its productivity.

OOP Programming Languages

Java, C++,  Python, R, PHP, Visual Basic.NET, JavaScript, Ruby, Perl, Object Pascal, Objective-C, Dart, Swift, Scala, Kotlin, Common Lisp, MATLAB, and Smalltalk.

Object Oriented programming Concepts has been covered in brief, which would enable to to understand the OOP based Programming Languages in better way. Please like and share the topic.

To download java for free Please visit the LINK

You May Also Like:

C Language Introduction            Let us Learn JavaScript from Step By Step              How to Activate GST in Tally.ERP9 ?        What is New in HTML5

0 0 votes
Article Rating
Subscribe
Notify of
guest

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback
3 years ago

[…] Object Oriented Programming Features            Dynamic Memory Allocation in C    Where to write JavaScript Code        What is New in HTML5  […]

trackback
3 years ago

[…] Object Oriented Programming Features […]

trackback
3 years ago

[…] Object Oriented Programming Features       […]

Please Subscribe to Stay Connected

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

DigitalSanjiv will use the information you provide on this form to be in touch with you and to provide updates and marketing.
Share via
Copy link
Powered by Social Snap