16. Inheritance Flashcards
What two steps are needed to delete an element in a partially filled array?
ss
What is UML short for?
ss
In the representation for a class, how are public items distinguished from private ones?
ss
What four values are used to generate a colour?
ss
If the relationship ‘A is a B’ is modelled by two classes A and B, which is the superclass and which is the subclass?
A is a subclass B is a superclass
How do we invoke the constructor of the superclass, and when?
ss
When do we invoke the constructor of the superclass implicitly?
ss
What kinds of method can be overridden? Can the new version have a different body? Different parameters? Different name?
ss
What simple errors is the @Override annotation protect us from?
ss
If an object is polymorphic, what does that mean? And how do we achieve it?
ss
In what sense might a method be dynamically bound? Which types of method have this feature?
ss
In what way does a subclass extend its superclass?
ss
How do we make a class abstract, and what can we not do with it when we have made it abstract?
ss
How do we define an abstract method, and when do we? In what sense do we not override an abstract method?
ss
What does it mean to make a method final, and how do we achieve it? What kinds of method can be made final? What about a final class?
ss