Exam 5: Interfaces, Implementations, and Polymorphism

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

Which of the following is one of the hallmarks of well-designed software?

Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
Verified

C

What method does Python run when it sees the in operator used with a collection?

Free
(Multiple Choice)
4.9/5
(31)
Correct Answer:
Verified

A

While desirable, testing is not a critical part of software resource development.

Free
(True/False)
4.9/5
(35)
Correct Answer:
Verified

False

You can use a for loop on any collection.

(True/False)
4.8/5
(35)

A docstring is a string enclosed in double quotes that will be displayed when Python's help function is run on a resource.

(True/False)
4.7/5
(36)

What does Python do when it sees a for loop on an iterable object?

(Multiple Choice)
4.8/5
(40)

In the remove method for LinkedBag, if probe points to the node at the head of the linked structure, trailer will point to the tail.

(True/False)
4.8/5
(43)

What is one of the pieces of data that must be initialized in the __init__ method in the LinkedBag class?

(Multiple Choice)
4.8/5
(28)

In the ArrayBag class, what must the __init__ method do if a source collection is specified?

(Multiple Choice)
4.8/5
(30)

Which of the following methods will require changes between the ArrayBag and the LinkedBag class?

(Multiple Choice)
4.9/5
(39)

Which is true about a bag collection?

(Multiple Choice)
4.8/5
(33)

Class diagrams show the relationships among classes at various levels of detail.

(True/False)
4.8/5
(31)

The following code copies the data from a specified source collection in the LinkedBag __init__ method. What is the missing code? for item in sourceCollection: < missing code >

(Multiple Choice)
4.9/5
(39)

Which of the following is NOT a goal of the barrier that separates an interface from implementation?

(Multiple Choice)
4.8/5
(34)

How can the performance of the in and remove functions be described in the two bag implementations?

(Multiple Choice)
4.7/5
(30)

Data that is needed to represent the state of a collection are assigned instance variables in the __help__ method of the class.

(True/False)
4.9/5
(43)

Each time you run Python's document function to obtain information about a module, data type, method, or function, you are accessing documentation about that resource's interface.

(True/False)
4.9/5
(41)

A precondition is a statement of what must be true for a method to perform its actions correctly.

(True/False)
4.8/5
(36)

The code for the __iter__ method is shown below. What is the missing code? Def __iter__(self): < missing code > While cursor < len(self): Yield self.items[cursor] Cursor += 1

(Multiple Choice)
4.9/5
(39)

What testing tool can be used to help ensure that a resource meets its requirements?

(Multiple Choice)
4.9/5
(46)
Showing 1 - 20 of 50
close modal

Filters

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