Mapa mental
Aggregation
Conteúdo do mapa
Aggregation
Composition
- each instance has the only reference to its contained object
- container owns the object and it's not ok if the outside word wants to make changes
- every time we want the object in or out the container we have to make defensive copies
Inheritance
- It s a special kind of composition with a parent class and a child class
- the child class inherits all the public feauture(methods and fields) of the parent class
- when we want to access the parent feautres we use super and if we want to acces its constructor we use super()
- another benefir of inheritance is polymorphysm: the child can be casted as a parent but still use the child method
- the child can override the parent method
- the child extends the parent class
container keeps a reference but its ok if changes happen in the outside world
while copying we just have to make sure the reference is the same
Informações
- Descrição
- Mapa Mental sobre Aggregation, criado por Angie Benxhi em 08-04-2014.
- Criado por
- Angie Benxhi
- Visualizações
- 22
- Avaliação