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:-
- 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.
- 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.
- Data Abstraction:Data Abstraction is the act of representing only essential features without including the background details.
- Data Encapsulation: Data Encapsulation is the act of combining data and functions into single unit (class).
- 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.
- Polymorphism: Polymorphism is composed of two words ’poly’ means many and ’morph’ means forms. So we can say that polymorphism means ’many forms’.
Thanks and Regards,
Web Designer, Doalongme