Object-Oriented Programming in C++

Basics of C++

C++ is a general-purpose, case-sensitive programming language that follows Object Oriented Programming (OOP) Concept. It was developed at AT & T Bell laboratories by Bjarne Stroustrup in the early 1979s . The initial name of C++ was C with Classes but later on it was renamed as C++.

C++ is a middle-level language as it supports both high-level language and low-level language features. C++ is an extension to C language or superset of C Language and supports Classes, Inheritance, Function Overloading and Operator Overloading which C language was lacking.

Object-Oriented Programming Concepts

The Object-Oriented Programming (OOP) languages like C++ and Java follow a different programming principles from Structured Programming Languages like C and COBOL. Here are some of them:-

  1. Class: A class represents a set or group of objects that share common characteristics and behavior. Example of class can be considered as Fruit, Car etc.
  2. Object: An Object is an identifiable entity with specific characteristics and specific behavior. An object may have a name, a set of attributes, and a set of actions or services. Example of object can be considered as Apple, Mango, Grapes, Banana etc in class Fruits and Mercedes, BMW, Audi etc in class car.
  3. Data Abstraction:Data Abstraction is the act of representing only essential features without including the background details.
  4. Data Encapsulation: Data Encapsulation is the act of combining data and functions into single unit (class).
  5. Inheritance: Inheritance is the capability to inherit all the properties and functionalities from one class to another class. Important advantage of Inheritance is the code reusability.
  6. Polymorphism: Polymorphism is composed of two words ’poly’ means many and ’morph’ means forms. So we can say that polymorphism means ’many forms’.

This blog is written by Amit Kushwaha.
Read this full blog HERE.

Thanks and Regards,
Amit Kushwaha
Web Designer, Doalongme
Founder, Tyuts.in



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store