Preview

01 - Introduction to OOP

 1. Some people believe that OOP is a more intuitive programming style to learn, because people find it easy to reason about objects and relationships between them

  TRUE

  FALSE

 2. Object-oriented programming allows us to model the real world and the vocabulary it uses is deeply rooted in us, way before computers were a thing. Fill in the blanks
The greek philosopher .................. (in his theory of forms)
believed that the real universe was all the ideas
and abstractions we have about different things
we observe and our observable world was merely made of 
imperfect shadows or instances of these ideas/grand templates.
plato_oop.jpg

  Hercules

  Jesus

  Plato

  Leon

 3. Object Orientated Programming (OOP) is one of the many programming paradigms. A paradigm is….

  a particular type of low level language

  referring to machine code (1s and 0s)

  referring to the C language

  an approach to solving a problem

 4. OOP is based around the idea that everything is an object. Objects have …..

  directories and templates

  failures and kernels

  attributes and methods

  bases and subbases

 5. OOP basically creates ……………………which are called classes.

  templates

  functions

  procedures

  directories

 6. Each class can also be thought of as a ……………….

  machine code replica

  blueprint

  attribute

  function

 7. In OOP vocabulary, an object is …………

  a method of a class

  an instance of a class

  an attribute of an instance

  a class of an instance

 8. Classes can be used to create objects. Many instances of a class can be present as the program runs.

  FALSE

  TRUE

 9. A game, for example, may have a 'player' class. Many ……………………………

  classes can be created from the object

  All of the above are true

  objects cannot be created from a single class

  player objects (instances of the player class) can be created

 10. Remember, a class is a blueprint, and it will usually contain the ….

  library functions and insertions

  loops and if statements within it

  variables and CPU directory

  attributes (variables) and methods (functions - what it will do)

 11. Which of the following is a popular OOP language

  All of the above

  C++

  Java

  Python

 12. Objects created for Object Oriented Programs can easily be reused in other programs. This is _____________________-

  a disadavtange of OOP

  None of the above

  a security breach

  an advantage of OOP

 13. Another benefit of OOP is that once an Object is created, knowledge of its implementation is not necessary for its use

  TRUE

  FALSE

 14. OOP also provides a clear_______________ for programs which makes it good for defining abstract datatypes in which implementation details are hidden

  non modular structire

  None of the above

  linear sequence of binary bits

  modular structure

 15. Creating a class brings an exceptional amount of “organizational power” to our programs, and to our thinking. We can group together methods and attributes and reuse them.

  TRUE

  FALSE