1/6
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Abstract class
cannot be instantiated, some methods may be unimplemented, may include some implemented methods with defualt methods
dynamic binding
methods selected at runtime based on the class of the objects referenced, not the class of the variable that holds the object reference
why polymorphism?
generic treatment of objects, ex) array of animals, programmer must be disciplined to ensure overridden methods consistently implement expected behavior.
what fields does a subclass contatin
its own and superclass
if you have even one abstract method, the whole class needs to be
abstract also
true or false abstract classes can have instance vriables
true -> name vs dog name
abstract methods
may be declared abstract, provide only header no body, class must then also be declared abstract