O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

Inheritance

Tate Johnson Computer Science Inglês

Conteúdo do mapa

Inheritance

  1. process of deriving a new class from an existing one.

  2. Super class cannot access child instance data or methods unless its public.

    • Child class CAN access PUBLIC data/methods of parents
      • Child class CANNOT access PRIVATE data/methods of parent
  3. Reserved word: extends

    • You can only extend ONE class.
  4. protected: can only be accessed by the child of the parent class

  5. Super: gives access to parent's data/methods

    • Called like: super() or super(value)
      • **If the first line in the Child's constructor is not a call to the parent class. Java implicitly places a super there. With no params**
        • Exception: a chained call to another constructor in same class will automatically defer super to that class.
          • super(xxx) --> call to parent class constructor
            • super.xxx --> call to parent class instance data
              • super.xxx() --> call to parent class method
  6. Overriding:

    • When a child class defines a method w/ the same name and signature as the parent. The child version overrides the parents.
      • How to implement: @Override before the method
        • *Static methods can be inherited but NOT overriden.

Informações

Descrição
Computer Science Mapa Mental sobre Inheritance, criado por Tate Johnson em 27-04-2021.
Criado por
Tate Johnson
Visualizações
2
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?