Exam 11: Inheritance
Exam 1: Introduction to Computers and Programming36 Questions
Exam 2: Input, Processing, and Output35 Questions
Exam 3: Decision Structures and Boolean Logic35 Questions
Exam 4: Repetition Structures34 Questions
Exam 5: Functions and Modules69 Questions
Exam 6: Files and Exceptions34 Questions
Exam 7: Lists and Tuples35 Questions
Exam 8: More About Strings35 Questions
Exam 9: Dictionaries and Sets35 Questions
Exam 10: Classes and Object Oriented Programming35 Questions
Exam 11: Inheritance35 Questions
Exam 12: Recursion35 Questions
Exam 13: GUI Programming35 Questions
Select questions type
In a UML diagram depicting inheritance, you only write the name of the subclass.
Free
(True/False)
4.7/5
(35)
Correct Answer:
False
Of the two classes Cola and Soda, which would most likely be the subclass?
Free
(Multiple Choice)
4.9/5
(42)
Correct Answer:
A
In an inheritance relationship, the extended class is called the _______________.
Free
(Short Answer)
4.7/5
(33)
Correct Answer:
subclass
What gives a program the ability to call the correct method depending on the type of object that is used to call it?
(Multiple Choice)
4.8/5
(38)
In the following line of code, what is the name of the base class?
Class Male(Human):
(Multiple Choice)
4.9/5
(43)
_____ allows a new class to inherit the members of the class it extends.
(Multiple Choice)
4.8/5
(39)
Examine the following piece of code:
Class Potato (Vegetable):
In a UML diagram, what would the open arrowhead point to?
(Multiple Choice)
4.8/5
(35)
Which method can you use to determine whether an object is an instance of a class?
(Multiple Choice)
4.8/5
(39)
Polymorphism works on any two class methods that have the same name.
(True/False)
4.9/5
(38)
What is the relationship called in which one object is a specialized version of another object?
(Multiple Choice)
4.8/5
(45)
Each subclass has a method named __init__ that overrides the superclass's __init__.
(True/False)
4.8/5
(38)
When a class inherits another class, it is required to use all the data attributes and methods of the superclass.
(True/False)
4.9/5
(33)
New attributes and methods may be added to a subclass, which makes it a(n) _______________ version of the superclass.
(Short Answer)
4.9/5
(40)
_______________ allows subclasses to have methods with the same names as methods in their superclasses.
(Short Answer)
4.8/5
(33)
Showing 1 - 20 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)