¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

Inheritance

Jada Matthews Inglés

Contenido del mapa

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.

Información

Descripción
Mapa Mental sobre Inheritance, creado por Jada Matthews el 21/11/2019.
Creado por
Jada Matthews
Visitas
0
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?