Wednesday, December 4, 2019

Quiz 9 19FL-IT280-01 - Object Oriented Programming

  • Question 1

    4 out of 4 points
    Although Python is considered an object-oriented language, its syntax does not enforce data encapsulation.
    Correct Answer:
    Correct True
  • Question 2

    4 out of 4 points
    Any object can be pickled before it is saved to a file, and then unpickled as it is loaded from a file into a program.
    Correct Answer:
    Correct True
  • Question 3

    4 out of 4 points
    What are the two parts of a rational number? (Choose two.)
    Correct Answers:
    Correcta. 
    Correctd. 
  • Question 4

    4 out of 4 points
    In Python, when does an object reach the end of its life?
    Correct Answer:
    Correctc. 
  • Question 5

    4 out of 4 points
    If the parenthesized parent class name is omitted from the class definition, the new class is automatically made a subclass of self.
    Correct Answer:
    Correct False
  • Question 6

    4 out of 4 points
    Python programmers typically capitalize their own class names to distinguish them from variable names.
    Correct Answer:
    Correct True
  • Question 7

    4 out of 4 points
    Most object-oriented languages require the programmer to master the following techniques: data encapsulation, inheritance, and abstraction.
    Correct Answer:
    Correct False
  • Question 8

    4 out of 4 points
    What function do you use to save an object utilizing the pickle module?
    Correct Answer:
    Correctc. 
  • Question 9

    4 out of 4 points
    To reduce a rational number to its lowest terms, you first compute the greatest common divisor (GCD) of the numerator and the denominator, using Euclid's algorithm.
    Correct Answer:
    Correct True
  • Question 10

    4 out of 4 points
    If the statements in the try clause raise no exceptions, the except clause is skipped and control proceeds to the end of the try-except statement.
    Correct Answer:
    Correct True
  • Question 11

    4 out of 4 points
    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?
    Correct Answer:
    Correctc. 
  • Question 12

    4 out of 4 points
    The function call str(s) is equivalent to the method call s.__str__().
    Correct Answer:
    Correct True
  • Question 13

    4 out of 4 points
    What statement is an accurate description of the concept of polymorphism in object-oriented programming?
    Correct Answer:
    Correctc. 
  • Question 14

    4 out of 4 points
    What is the process in which the Python virtual machine recycles its storage known as?
    Correct Answer:
    Correctb. 
  • Question 15

    4 out of 4 points
    The Python interpreter picks out equality from the other comparisons by looking for an __equals__ method when it encounters the == and != operators.
    Correct Answer:
    Correct False
  • Question 16

    4 out of 4 points
    In the context of Python objects, what does the pickling process do?
    Correct Answer:
    Correctb. 
  • Question 17

    4 out of 4 points
    What can be used to describe and document the analysis and design of complex software systems?
    Correct Answer:
    Correctb. 
  • Question 18

    4 out of 4 points
    Objects in the natural world and objects in the world of artifacts can be classified using inheritance hierarchies.
    Correct Answer:
    Correct True
  • Question 19

    4 out of 4 points
    The scope of an instance variable is the entire module.
    Correct Answer:
    Correct False
  • Question 20

    4 out of 4 points
    What type of programming is defined by the term "imperative programming"?
    Correct Answer:
    Correctc. 
  • Question 21

    4 out of 4 points
    The attributes of an object are represented as what type of variables?
    Correct Answer:
    Correcta. 
  • Question 22

    4 out of 4 points
    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?
    Correct Answer:
    Correcta. 
  • Question 23

    4 out of 4 points
    A class variable is visible to all instances of a class and does not vary from instance to instance.
    Correct Answer:
    Correct True
  • Question 24

    4 out of 4 points
    Inheritance allows several different classes to use the same general method names.
    Correct Answer:
    Correct False
  • Question 25

    4 out of 4 points
    At the top, or root of the class hierarchy is the most abstract class. What is the name of this class?
    Correct Answer:
    Correctd. 

0 comments:

Post a Comment