Principle of OOP

  1. Which of the following languages is not a pure Object-Oriented language?
    • a) Java
    • b) Simula
    • c) Ada
    • d) Eiffel
  2. Which of the languages is a pure object-oriented language?
    • a) C++
    • b) Smalltalk
    • c) Object Pascal
    • d) Objective C
  3. Which of the following statements is TRUE with respect to object-oriented programming?
    • a) Emphasis is on algorithms rather than data.
    • b) Data can move freely from function to function.
    • c) Programs are divided into small programs called functions.
    • d) Data and functions that operate on them are tied together.
  4. Which of the following issues is considered as the major drawback of the procedure – oriented programming?
    • a) Employs tap-down approach in program design.
    • b) Emphasis is an algorithms.
    • c) Most of the functions share global data.
    • d) Large programs are divided into functions.
  5. One of the major advantages of object-oriented programming approach is:
    • a) It can easily map real-world problems.
    • b) Data can move freely around the system.
    • c) Any language can be used for programming.
    • d) Structured programming concept can be easily incorporated.
  6. The wrapping up of data and functions into a single unit is known as:
    • a) Function overloading
    • b) Static binding
    • c) Abstraction
    • d) Encapsulation
  7. The process by which objects of one class can acquire the attributes of objects of another class is known as:
    • a) Attribute passing
    • b) Inheritance
    • c) Abstraction
    • d) Polymorphism
  8. Which one of the following concepts enables the re-usability of code?
    • Dynamic binding
    • Polymorphism
    • Inheritance
    • Encapsulation
  9. The term function over loading refers to:
    • Message passing
    • Dynamic binding
    • Data hiding
    • Polymorphism
  10. Which of the following characteristics C++ does not support?
    • Persistence
    • Generacity
    • Garbage collection
    • Late binding
  11. Encapsulation ensures that
    • any function in the program can access the data
    • external functions cannot access an object’s nonpublic data
    • external functions cannot access any data of the object
    • the data of the object is never modified
  12. A rectangle notation that is used to denote an object usually show
    • communication links with other objects
    • only data members of the object
    • data and functions of the object
    • relationship with other objects

Answers:

  1. Simula
  2. Objective C
  3. Data and functions that operate on them are tied together.
  4. Emphasis is an algorithms.
  5. Structured programming concept can be easily incorporated.
  6. Encapsulation
  7. Inheritance
  8. Inheritance
  9. Polymorphism
  10. Garbage collection
  11. external functions cannot access an object’s nonpublic data
  12. data and functions of the object

Related posts