GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Aggregation

Angie Benxhi Englisch

Inhalt der Mindmap

Aggregation

  1. 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
  2. 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
  3. container keeps a reference but its ok if changes happen in the outside world

  4. while copying we just have to make sure the reference is the same

Informationen

Beschreibung
Mindmap am Aggregation, erstellt von Angie Benxhi am 08/04/2014.
Erstellt von
Angie Benxhi
Aufrufe
22
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck