Mapa mental
Inheritance
Conteúdo do mapa
Inheritance
extends only one class
- Parent class
- child class
- is-a relationship
superclass
- object class
subclass
accessibility
- visibility in the superclass reduced from the subclass
- the subclass can access the superclass' private and public methods, but not its protected methods
instance of keyword
- tests type of object
- used in 'if' statement
type casting
- up-casting: casts object to parent class
- child class can only be casted to its parent class
method overriding
- when ≥ 2 methods in a class have the same method name, but different parameters
method overloading
- having 2 methods with the same name and parameters
- One method is in the parent class, while the other is in the child class
Informações
- Descrição
- Mapa Mental sobre Inheritance, criado por Annika Ramnath em 21-11-2019.
- Criado por
- Annika Ramnath
- Visualizações
- 0
- Avaliação