Posts

Showing posts from September, 2021

Inheritance

Image
 Inheritance is a process in which one object acquires all the properties and behaviors of its parent object automatically. In such a way, you can reuse , extend or modify the attributes and behaviors which are defined in other classes. In C++, the class which inherits the members of another class is called derived class and the class whose members are inherited is called base class. The derived class is the specialized class for the base class. Types of inheritance:-                               1) Single inheritance:-                                                                 When one class inherits another class, it is known as single                              ...

Basic of OOPs(Object Oriented Programmings)

Image
 Definition:-                    OOP (Object Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts. CLASS:- It is defined data type which defines its properties and its functions. It is the only logical representation of data. It is blue print of objects. For example:- Human beings is a class. The body part are its properties, and the actions performs by human is its function. Class does not occupy any space till an object is instantiated. Class is define by using keyword class followed by the name of class. Here, we defined a class named Room. The Variables length , breadth and height are declared inside the class are known as data members . The functions calculateArea() and calculateVolume() are known as member functions of a class. OBJECT:- It is run-time entity. It is an instance of the class. An obj...