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

  FALSE

  TRUE

 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

  Leon

  Jesus

  Plato

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

  an approach to solving a problem

  a particular type of low level language

  referring to the C language

  referring to machine code (1s and 0s)

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

  failures and kernels

  bases and subbases

  directories and templates

  attributes and methods

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

  directories

  templates

  procedures

  functions

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

  blueprint

  machine code replica

  function

  attribute

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

  a method of a class

  an attribute of an instance

  a class of an instance

  an instance of a class

 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 ……………………………

  All of the above are true

  objects cannot be created from a single class

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

  classes can be created from the object

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

  variables and CPU directory

  loops and if statements within it

  library functions and insertions

  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 security breach

  None of the above

  an advantage of OOP

  a disadavtange of OOP

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

  FALSE

  TRUE

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

  modular structure

  None of the above

  linear sequence of binary bits

  non modular structire

 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