Chapter 18 Flashcards
encode
to represent one set of values using another set of values by constructing a mapping between them.
class attribute
an attribute associated with a class object. class attributes are defined inside a class definition but outside any method.
instance attribute
an attribute associated with an instance of a class
veneer
a method or function that provides a different interface to another function without doing much computation.
inheritance
the ability to define a new class that is a modified version of a previously defined class.
parent class
the class from which a child class inherits.
child class
a new class created by inheriting from an existing class; also called a “sub-class”.
IS-A relationship
the relationship between a child class and its parent class.
HAS-A relationship
the relationship between two classes where instances of one class contain references to instances of the other.
class diagram
a diagram that shows the classes in a program and the relationships between them.
multiplicity
a notation in a class diagram that shows, for a HAS-A relationship, how many references there are to instances of another class.