Mind map
Abstract Classes
Map content
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 {}
Information
- Description
- Computer Science Mind Map on Abstract Classes, created by Tate Johnson on 27/04/2021.
- Created by
- Tate Johnson
- Views
- 0
- Rating