2110 Flashcards
Does an abstract class need to be instantiated?
No - it just defines variables t methods these methods can
Also be abstract
Do subclasses of an abstract class need to inherit variables & methods of their superclass?
Yes
Which class type i just a header and no body?
An abstract class
Abstract class syntax
What is an interface
Just a collection of method declaration • no data no body
How does a class implement an interface
It guarantees to use all the methods! Therefore an interface enforces an API in software design
Interface syntax
How is java  Standard library organized?
In one large class hierarchy where the object class is the parent of all classes. every single class implicitly extends the object class
Three pillars of object oriented programs
Encapsulation, inheritance and polymorphism
Define encapsulation
Define iwhentance
Define polymorphism
The ability Of one object to be treated, used like another this works for objects in the inheritance hierarchy
Can me use a reference of a superclass type to refer to an object of its subclass type
Yes
What allows us to place objects from different steps within a class hierarchy into the same array?
Polymorphism
Does polymorphism work bottom up in a class hierarchy?
No! Only top down