OOPS Concepts in C++
OOP – Object Oriented Programming . It is a programming approach which deals with objects and classes . It creates reusable code to achieve modularity . Why OOPs concepts? It makes the code modular. The code can be reusable any times. It is scalable. It gives you security from unauthorized access. OOPs concepts: The concepts are listed below. Class Object Abstraction Encapsulation Polymorphism Inheritance Each one of the concepts are explained with code as follows… 1.Class: It is a prototype from which the object are created. It has a collection of variables and methods.you can create multiple objects for single class. The class has following components. Class Components: Class name: Name of the class. Access specifiers: private, public and protected Methods: it defines the functionalities. Variables: it deals with val...