inheritance 1 Flashcards
is a mechanism that enables one class to acquire all the behaviors and attributes of another class
Inheritance
A _______ ______ is a visual tool that provides you with an overview of a class.
class diagram
class diagram consists of a ______ divided into ____
rectangle
three sections
the top section contains the ____ of the class,
name
the middle section contains the________.
names and data types of the attributes,
the bottom section contains the ________.
methods
Only the ______, ________, _______, are provided in the diagram
method return type, name, and arguments
is a class that is used as a basis for inheritance
Base class
is a class that inherits from a base class.
Derived class
A derived class always _____ case or example of the more general base class.
“is a(n)”
“Is a” describes _______, but “has a” describes ______.
inheritance
containment
Two types of containment:
Composition
Aggregation
the relationship in which a class contains one or more members of another class, when those members would not continue to exist without the object that contains them.
composition
the relationship in which a class contains one or more members of another class, when those members would continue to exist without the object that contains them.
aggregation
Synonyms to base class: _______
superclass & parent class