Mindmap
Abstract Classes
Inhalt der Mindmap
Abstract Classes
What are they?
- this class is the superclass, it CANNOT be instantiated. Subclasses are derived from them.
- Although it CANNOT be instantiated it can have constructors.
- this class is the superclass, it CANNOT be instantiated. Subclasses are derived from them.
**IF A METHOD IS ABSTRACT IN AN ABSTRACT CLASS IT MUST BE OVERRIDEN IN THE CHILD CLASS
Object is not an abstract class
Rules:
- 1. You CANNOT instantiate an abstract class.
- 2. Abstract classes CAN have concrete methods
- 3. A subclass CAN be abstract even if the super isn't
- 4. A class CAN override a method & make it abstract
- 3. A subclass CAN be abstract even if the super isn't
- 2. Abstract classes CAN have concrete methods
- 1. You CANNOT instantiate an abstract class.
Examples:
- public abstract class Animal {}
- public abstract void makeNoise() {}
- Must be overriden in subclass/child class.
- public abstract void makeNoise() {}
- public abstract class Animal {}
Informationen
- Beschreibung
- Computer Science Mindmap am Abstract Classes, erstellt von Tate Johnson am 27/04/2021.
- Erstellt von
- Tate Johnson
- Aufrufe
- 0
- Bewertung