GoConqr has a new look! Let us know what you think.

Mind map

Inheritance

Katie Arnott English

Map content

Inheritance

  1. what makes the code accessible in any OOP language

  2. the process of extending a class

    • can create a new class that will have a "parent child" relationship with the original
      • child class can be extended too until you specifically declare it as final
    • use EXTENDS keyword, after the class name and before parent class
  3. special "is-a" relationship created when extending a class

    • then can assign instance of subclass to a reference variable of the parent type
  4. from within subclass, can access a superclass public methods but not private

  5. you can override a method by writing new method in subclass, except a final method

    • if you do not explicitly write a constructor for a subclass, the compiler will implicitly add a no argument constructor
    • can use super keyword to call a hidden method in addition to helping implicitly write constructors
  6. can cast instance of subclass to its parent class

Information

Description
Mind Map on Inheritance, created by Katie Arnott on 21/11/2019.
Created by
Katie Arnott
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?