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

Mindmap

Object Oriented Programming: Inheritance

Scott Cornaby Englisch

Inhalt der Mindmap

Object Oriented Programming: Inheritance

  1. Inheritance

    • What Is It?
      • A way to create a child class that "inherits" all the data types and functions of the parent
    • What Is It For?
      • Avoid duplication! Write code once in the parent and then use it in all the children.
      • Keep common code in one place. If you ever have to update it you can change the parent and automatically update all the children
  2. Overrides

    • What is it?
      • Replace an inherited function with a child specific function of the same name
    • What is it for?
      • A class that mostly acts like it's parent with one or two exceptions
      • Keep the same "interface" as the parent but act differently
  3. Super Keyword

    • What is it?
      • A way to override an override and call the original parent function
    • What is it for?
      • Mix custom and default behavior
  4. Polymorphism

    • What is it?
      • Child classes can be grouped like they are an instance of the parent class but will still use overrides to behave like their unique sub class
    • What is it for?
      • Convenient way to group similar items into one array or collection. No more creating one collection per class type!
      • Stop worrying about which objects are which class. Trust each class to call the right version of overridable methods.

Informationen

Beschreibung
Mindmap am Object Oriented Programming: Inheritance, erstellt von Scott Cornaby am 06/08/2019.
Erstellt von
Scott Cornaby
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck