1/7
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
“is a” relationship
exists when one object is a
specialized version of another object (rectangle is a shape)
inheritance
used to create an “is a” relationship
between classes (bee are a type of insect)
superclass (base class)
a general class
subclass (derived class)
a specialized class, extended version of superclass (class Car(Automobile):)
inheritance in UML diagrams
show inheritance by drawing a line
with an open arrowhead from subclass to superclass
polymorphism
an object’s ability to take different
forms (accepts either object and calls another method based on the objects actual type)
AttributeError exception
raised when a method
receives an object which is not an instance of the
right class
isinstance function
determines whether object is
an instance of a class (isinstance(object, class))