Exam 9: Design With Classes

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

Operator overloading is an example of an abstraction mechanism.

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

True

Most object-oriented languages require the programmer to master the following techniques: data encapsulation, inheritance, and abstraction.

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

False

What is the __str__ method used for?

Free
(Multiple Choice)
4.7/5
(35)
Correct Answer:
Verified

A

You are utilizing the pickle.load function to load objects into a program from a file. However, your program raises an exception as soon as the end of the file is reached. What must you do?

(Multiple Choice)
4.9/5
(35)

How could you overload the addition operator in the Python language?

(Multiple Choice)
4.9/5
(35)

For data that are owned by individual objects, you must use class variables.

(True/False)
4.8/5
(34)

Regarding class variables, what statement is accurate?

(Multiple Choice)
4.9/5
(39)

What statement is an accurate description of the concept of polymorphism in object-oriented programming?

(Multiple Choice)
4.9/5
(36)

What concept within object-oriented programming involves the restriction of the manipulation of an object's state by external users to a set of method calls?

(Multiple Choice)
4.8/5
(36)

In general, you should use class variables only for symbolic constants or to maintain data held in common by all objects of a class.

(True/False)
4.9/5
(34)

A class variable is visible to all instances of a class and does not vary from instance to instance.

(True/False)
4.8/5
(46)

What effect does using the model/view pattern of design have?

(Multiple Choice)
4.8/5
(41)

At the top, or root of the class hierarchy is the most abstract class. What is the name of this class?

(Multiple Choice)
4.9/5
(46)

What is the process in which the Python virtual machine recycles its storage known as?

(Multiple Choice)
4.9/5
(34)

The attributes of an object are represented as instance datum.

(True/False)
5.0/5
(35)

It is not usual to bother subclassing unless the two classes share a substantial amount of abstract behavior.

(True/False)
4.8/5
(39)

The function call str(s) is equivalent to the method call s.__str__().

(True/False)
4.8/5
(38)

Although Python is considered an object-oriented language, its syntax does not enforce data encapsulation.

(True/False)
4.9/5
(41)

What can be used to describe and document the analysis and design of complex software systems?

(Multiple Choice)
4.8/5
(36)

The scope of an instance variable is the entire module.

(True/False)
5.0/5
(30)
Showing 1 - 20 of 50
close modal

Filters

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