GoConqr has a new look! Let us know what you think.

Mind map

Inheritance

Jada Matthews English

Map content

Inheritance

  1. An important feature in OOP used to extend a class.

    • Parent-Child relationship between classes
      • The child class can be extendable until you declare it as "final"
        • Use "final" keyword to prevent classes from being subclassed or extended.
    • Use the "extends" keyword after class name and before parent class.
      • Example: public class Child extends Parent{}
  2. Allows you to change behaviors of an existing class to better suit your need s.

  3. Multiple inheritance is allowed in C++ unlike JAVA.

  4. The "is-a" relationship is a special relationship between the subclass and the superclass.

    • Superclass being a big class and the subclasses are the different types of the superclass.
    • A subclass inherits all public methods and fields from the superclass.
    • Must not assign an instance of a subclass to a reference variable of the parent type.

Information

Description
Mind Map on Inheritance, created by Jada Matthews on 21/11/2019.
Created by
Jada Matthews
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?