Basic Concepts Of Object Oriented Programming - TGN

Latest

Welcome to Technicalgurunow! Your No. 1 source for all networking , earning and programming tutorials. We're dedicated to providing you the best of knowledgeable information with a focus on dependability. We hope you enjoy our blog.

Saturday, November 23, 2019

Basic Concepts Of Object Oriented Programming

Basic Concepts Of Object Oriented Programming


The basic concepts of Object Oriented Programming includes:-
  1. Objects
  2. Classes
  3. Data Abstraction and Data Encapsulation
  4. Inheritance
  5. Polymorphism
  6. Dynamic Binding
  7. Message Passing
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 or any item that the program has to handle. They may also represent user defined data such as vectors, time and lists.
  • Program objects should be chosen such that they match with the real world objects.
  • Each object contains data and code to manipulate the data. It is sufficient to know the type of message accepted and the type of response returned by the objects.
  • Syntax:          class_name object_name;
2. Classes:-
  • The entire set of data and code of an object can be made a user-defined data type with the help of a class.
  • After creating a class, we can create a number of objects belonging to that class. We can say that, class is a collection of objects of similar types.
  • Classes are user-defined data types and behave like the built-in types of a programming language.
  • Syntax:   class class_name
3. Data Abstraction and Data Encapsulation:- 
  • The wrapping up of data and functions into a single unit is known as Encapsulation.
  • The data is not accessible to the outside world and only those functions which are wrapped in the class can access it. This insulation of data from direct access by the program is called the data hiding or information hiding.
  • Representing the only essential features in a data without including the background  details or explanations is known as Abstraction.
  • Since the classes use the concept of data abstraction, they are known as Abstract Data Types(ADT).
4. Inheritance:-
  • We can say, Inheritance is a reusability.
  • It is the process by which objects of one class acquire the properties of objects of another class.
  • That is, it supports the concept of hierarchy.
  • We can also say that, we can add additional features to an existing class without modifying it.
5. Polymorphism:-
  • Polymorphism is a Greek word, which means the ability to take more than one form.
  • An operation may exhibit different behaviours in different instances. The behaviour depends upon the types of data used in the operation.
6. Dynamic Binding:-
  • Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run time.
  • It is also known as Late Binding and is associated with Polymorphism and Inheritance.
7. Message Passing:-
  • Objects communicate with one another by sending and receiving information much the same way as people pass messages to one another.
  • The concept of message passing makes it easier to talk about building systems that directly simulate their real world counterparts.
  • A message for an object is a request for execution of a procedure.
  • Message passing involves the name of the object, the name of the function and the information to be sent.


4 comments:

If you have any query, please let me know

Followers