C++ OOP

In This Section You Will Learn About Object Oriented Programming(OOP) in C++.

  • You Will Learn Object Oriented Programming(OOP) Basic Concept.
  • Benefits Of Object Oriented Programming.
  • Terminology used in Object Oriented Programming(OOP)
  • What Classes Are?
  • Syntax Of Object Oriented Programming in C++.
  • Examples Of Object Oriented Programming in C++.

What is Object Oriented Programming (OOP)?

Object Oriented Programming(OOP) is a programming paradigm that is organized around objects and data, what is mean by that it's simply mean that a program is consist of set of objects and data required for the objects.
Simple Example of object can be a (person) which has some set of data such as name, phone, address etc...,

Benefits Of Object Oriented Programming:

  • OOP make programming design simple one can take any problem scenario and break it into objects and then get the required data for the object,
  • OOP design is maintainable to future enhancement and extension,
  • It provides a clear modular structure for programs which makes it good for defining abstract datatypes in which implementation details are hidden,
  • It provides res-usability and faster development.

Terminology used in Object Oriented Programming(OOP)

Objects and Methods

An object is an encapsulation of data together with procedures that manipulate the data and functions that return information about the data. The procedures and functions are both called methods.

Encapsulation

Encapsulation refer to the mechanism that allow each object to have it's own data and methods, another words data and methods are encapsulated inside an object and is hidden from outside world.

Polymorphism

Polymorphism refer to a mechanism that allow method with the same name and parameter to behave differently depending on the object calling it.

Classes

Classes is a very important concept in OOP, classes can be considered is a category of objects.

Inheritance

Inheritance is a powerful mechanism which allow class to inherit from another class which provide re-usability and minimal programming effort.

Overloading and Overriding

Overloading refer to the concept that two or many method with the same name but different parameter, parameter difference may be data type of parameter is different or number of parameter is different.
Overriding refer to the concept that methods with the same name and parameter but their implementation is changed.


No comments:

Post a Comment

What is Cplusplus? Introduction To C++

What is C++? The Simple Answer to this question is c++ is a computer programming language. What is computer programming language and wh...