Preview

02-OOP Key Concepts

 1. Which of the following is NOT a part of Object Oriented Programming? (OOP)

  Inheritance

  Multitasking

  Encapsulation

  Information Hiding

 2. What is the template of an object called?

  Stencil

  ObjectTemplate()

  Blueprint

  Class

 3. OOP promotes a way of programming that allows programmers to think in terms of

  Attributes

  People

  Data

  Objects

 4. "Information Hiding" can also be termed as:

  Cloaking

  Inheritance

  Moulding

  Encapsulation

 5. The process by which one object can acquire the properties of another object is:

  Inheritance

  Polymorphism

  Abstraction

  Blueprinting

 6. A big advantage of OOP over traditional programming is:

  Cachability

  The objects are all declared private

  The convenience of giving all objects in a project the same name

  The ability to re-use classes

 7. "Constructors" in OOP are used to:

  Construct a function

  Build a GUI

  Construct attributes linked to an polymorphed state

  Initialize a newly created object

 8. Two or more methods with the same name in the same class with different arguments is called

  Method overriding

  Method overloading

  Method overusing

  Method overcompensating

 9. In an object oriented language, it is possible to create another class called a 'derived class' that is based on an existing class - The derived class has all the properties of the 'superclass' (the parent class) and also some data and methods of its own.

  False

  True

 10. What is the name of the created class in the below example?
class Dog:

    kind = 'canine'         # class variable shared by all instances
    def __init__(self, name):
        self.name = name    # instance variable unique to each instance

  kind

  Dog

  class

  canine