Exam 5: Interfaces, Implementations, and Polymorphism

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which Python function allows you to obtain information about a module, data type, method, or function?

(Multiple Choice)
4.9/5
(35)

When Python sees a for loop on an iterable object, it runs that object's __add__ method.

(True/False)
4.9/5
(41)

The code for the add method for the ArrayBag class is shown below. What is the missing code? Def add(self, item): Self.items[len(self)] = item < missing code >

(Multiple Choice)
4.8/5
(31)

What is the last step in the remove function in the ArrayBag class?

(Multiple Choice)
4.8/5
(34)

What is found in the body of the method code that is used to document the method?

(Multiple Choice)
4.9/5
(41)

When Python sees the in operator used with a collection, it runs the __contains__ method in the collection's class.

(True/False)
4.8/5
(39)

When the LinkedBag structure is not empty, self.items refers to the last node in the linked structure.

(True/False)
4.8/5
(33)

The design and implementation of a collection class consists of two steps. What is the first step?

(Multiple Choice)
4.8/5
(34)

What is the name of the method that performs the constructor operation for a class?

(Multiple Choice)
4.9/5
(46)

The logical size of an array-based bag will always be the same as the array's capacity.

(True/False)
4.8/5
(38)
Showing 41 - 50 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)