04 Inheritance, Polymorphism, and Interfaces Flashcards
It enables the use of existing class to define a new class.
Inheritance
Is is defined by adding instance variables and methods to an existing class.
Derived class
The derived class is also known as? (3)
subclass, child class, and descendant class.
The existing class that the derived class is built upon.
Base class
The base class is also known as? (3)
superclass, parent class, and ancestor class.
A derived class is defined by starting with another defined class and by adding methods and instance variables. True or False?
True
A derived class has its own constructors. It does not inherit any constructors from the base class. True or False?
True
Keyword that is used that the default constructor that calls another in that class?
this
A constructor can contain both super and this keyword.
False
It is the ability of an object to take on many forms.
Polymorphism
It allows many meanings to be associated to one method name?
Dynamic Binding
It is used to specify methods that a class must implement. It contains headings for a number of public methods.
Interface
An abstract class can be instantiated. True or False?
False
An abstract class should always have an abstract method.
False
It serves as a base class for subclasses. It may or may not include abstract methods.
Abstract class