UrbanPro
true

Take BTech Tuition from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Object Oriented Programming Paradigm

D Subba Rao
23/08/2017 0 0

Object Oriented Programming Paradigm:

OOPS is a better way of solving problems in computers compared to the procedural language programming such as in C. oops is designed around the data being operated upon as opposed to the operations, these operations are designed to fit data.

A type of programming in which programmers define not only the data type of a data structure, but also the types of operations that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. For example, objects can inherit characteristics from other objects.

One of the principal advantages of object-oriented programming techniques over procedural programming techniques is that they enable programmers to create modules that do not need to be changed when a new type of object is added. A programmer can simply create a new object that inherits many of its features from existing objects. This makes object-oriented programs easier to modify.

To perform object-oriented programming, one needs an object-oriented programming language such as Java C++ etc.

The C++ programming language provides a model of memory and computation that closely matches that of most computers. In addition, it provides powerful and flexible mechanisms for abstraction; that is, language constructs that allow the programmer to introduce and use new types of objects that match the concepts of an application.

Thus, C++ supports styles of programming that rely on fairly direct manipulation of hardware resources to deliver a high degree of efficiency plus higher-level styles of programming that rely on user-defined types to provide a model of data and computation that is closer to a human’s view of the task being performed by a computer. These higher-level styles of programming are often called data abstraction, object-oriented programming, and generic programming.

Features of OOPs are the following:

  • Encapsulation.
  • Data abstraction.
  • Inheritance.
  • Polymorphism.
  • Message passing.
  • Extensibility.
  • Persistence.
  • Delegation.
  • Genericity.
  • Multiple Inheritance.

Elements of Object Oriented Programming:

Object-Oriented Programming is centered around the new concepts such as classes, polymorphism, inheritance, etc. it is a well suited paradigm for the following:

  • Modeling the real world problem as close as possible to the users perspective.
  • Interacting easily with computational environment using familiar metaphors.
  • Constructing reusable software components and easily extendable libraries.
  • Easily modifying and extending implementations of components without having to recode every thing from scratch.

Definition of OOP:

OOP uses objects as its fundamental building blocks. Each object is an instance of some class. Classes allow the mechanism of data abstraction for creating new data types. Inheritance allows building of new classes from existing classes. Hence if any of these elements are missing in a program we cannot consider that program as objected oriented program.

Object oriented programming is a programming methodology that associates data structures with a set of operators which act upon it. In OOP’s terminology an instance of such an entity is known as an object. It gives importance to relationships between objects rather than implementation details. Hiding the implementation details within an object results in the user being more concerned with an objects relationship to the rest of the system, than the implementation of the object’s behavior.

Objects:

Objects are the basic run-time entities in an object-oriented system. Every object is associated with data and functions which define meaningful operations on that object.

What is Encapsulation?

It is a mechanism that associates the code and the data it manipulates into a single unit to and keeps them safe from external interference and misuse. In C++ this is supported by construct called class. An instance of an object is known as object which represents a real world entity.

What is 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. In programming languages, a data abstraction becomes an abstract data type or a user-defined type. In OOP, it is implemented as a class.

Inheritance is a means of specifying hierarchical relationships between types C++ classes can inherit both data and function members from other (parent) classes. Terminology: "the child (or derived) class inherits (or is derived from) the parent (or base) class."

What is Polymorphism?

Polymorphism is in short the ability to call different functions by just using one type of function call. It is a lot useful since it can group classes and their functions together. Polymorphism means that the same thing can exist in two forms. This is an important characteristic of true object oriented design which means that one could develop good OO design with data abstraction and inheritance, but the real power of object oriented design seems to surface when polymorphism is used.

In C++, polymorphism means that if the same message is sent to different objects, the object’s behavior depends on the nature of the object itself. This is sort of obvious for completely different objects, but the concept starts making sense when combined with inheritance.

What is Message passing?

It is the process of invoking an operation on an object. In response to a message the corresponding method is executed in the object.

What is Extensibility?

C++ allows the extension of the functionality of the existing software components. In C++ this is achieved through abstract classes and inheritance.

What is Persistence?

The phenomenon where the object (data) outlives the program execution time and exists between executions of a program is known as persistence. All data base systems support persistence. In c++ it is not supported. However the user can build it explicitly using file streams in a program.

What is Delegation?

Delegation is a way of making object composition as powerful as inheritance. In delegation two objects are involved in handling a request a receiving object delegates operations to its delegate. This is analogous to child class sending requests to the parent class.

What is Genericity?

It is technique for defining software components that have more than one interpretation depending on the data type of parameters. Thus it allows the declaration of data items without specifying their exact data type.

What is Multiple Inheritance?

The mechanism by which a class is derived from more than one base class is known as multiple inheritance. Instances of classes with multiple inheritance have instance variables for each of the inherited base classes. C++ supports multiple inheritance.

0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

Facts about C language
C programming language was developed in 1972 by Dennis Ritchie at AT&T Bell Labs. It was developed to overcome the problems of languages such as B, BPCL. It was developed to write the Unix operating...

Spring - Dependency Injection (DI)
Spring - Dependency Injection (DI) DI is a framework which provides loose coupling in code. Here loose coupling means no hard coding of the object. Instead of hard coding, we will be injecting these object...

Machine Learning Introduction
This is the age of “big data.” Once upon a time, only companies had raw data. There used to be servers where that data was stored and processed. First with the arrival of personal computers...

Brainmapping is the shortcut to longer subject recall.
Read through the subject matter and highlight the essential core areas covered. Select one core area at a time and dig into the finer details and subtopics,creating a brain map sequence. Write down...

Adeeba Riaz

0 0
0

Do You Give Enough Importance In Writing Main () In C Language?
I am sure; you guys are quite familiar with C programming, especially, while it comes to write the first line of your main function. In my class, I have seen many of my students are writing main function...
X

Looking for BTech Tuition Classes?

The best tutors for BTech Tuition Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Take BTech Tuition with the Best Tutors

The best Tutors for BTech Tuition Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more