Coder Social home page Coder Social logo

inheritance_classes-in-cpp's Introduction

Inheritance_Classes-in-CPP

##AIM:To study about different types of inheritance in C++

##THEORY:

In C++, it is possible to inherit attributes and methods from one class to another. We group the "inheritance" into two categories:
derived class (child) - the class that inherits from another class
base class (parent) - the class being inherited from

Types of inheritance in C++:
1.single inheritance-The inheritance in which a single derived class is inherited from a single base class
2.multiple inheritance-A class can also be derived from more than one base class, using a comma-separated list
3.multilevel inheritance-A class can also be derived from one class, which is already derived from another class.
4.hierarchical inheritance-the type of inheritance that has a hierarchical structure of classes. A single base class can have multiple derived classes, and other subclasses can further inherit these derived classes, forming a hierarchy of classes


Single:
Screenshot 2023-10-24 171900
Multiple:
Screenshot 2023-10-24 171743
Multilevel:
Screenshot 2023-10-24 171840
Hierarchical:
Screenshot 2023-10-24 171709

inheritance_classes-in-cpp's People

Contributors

sejalch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.