A) the previous item is returned
B) the compiler generates an error
C) a StopIteration exception is raised
D) the None item is returned
Correct Answer
verified
Multiple Choice
A) to customize an existing class
B) to create code redundancy
C) to avoid creating an __init__ method
D) to duplicate methods in an interface
Correct Answer
verified
Multiple Choice
A) setting the self.size variable to 0
B) adding items from the source collection
C) initializing the self.items variable
D) checking if a source collection exists
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) __len__ and count
B) __str__ and __eq__
C) isEmpty and add
D) __init__ and __len__
Correct Answer
verified
True/False
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) they are the same as a class interface
B) the are always a subclass of a superclass
C) they are not normally instantiated in client applications
D) they are used as concrete classes by client applications
Correct Answer
verified
Multiple Choice
A) delete all the methods that don't have to change
B) you don't need an __init__ method
C) the name of the subclass is in parentheses of the class header
D) no methods need be created or modified
Correct Answer
verified
Multiple Choice
A) when the bag is full
B) when the new item is less than the last item
C) when the new item is greater than the first item
D) when the bag is empty
Correct Answer
verified
Showing 41 - 50 of 50
Related Exams