Chapter - 1: Intro to OOP

State whether the following statements are True or False.


A
Sections
1
Exercises

A

B

C

D

1

(a) Object-oriented programming permits the reusability of the existing code.
True.

(b) Languages earlier than the procedural programming languages made use of only global variables.
True.

(c) In Object-oriented programming languages, the only way to transfer control from one place in the program to another place is by using the goto statement.
False: This is the only way in only unstructured programming.

(d) It is easier to write, understand and maintain programs if they use Object Oriented Programming model as compared to Structured  Programming model.
True.

(e) As compared to procedures, data is not given enough importance in Procedural Programming.
True.

(f) Structured Programming model does not represent the real-world problem as well as the Object-Oriented Programming model.
False: OOP can represent real-world problems.

(g) OOP model permits functional abstraction as well as data abstraction.
True.

(h) A class permits us to build user-defined data types.
True.

(i) Objects are to classes variables are to built-in data types.
True.

(j) Deriving a new class from an existing class promotes reusability of code.
True.

(k) Encapsulation facilitates a single function name to be used for the same operation performed on related derived classes.
False: That concept is called polymorphism, not Encapsulation.

(l) In polymorphism even though the function names are the same, their an implementation may vary from class to class.
False: In polymorphism, the same name is used, but for the functions of the same class.

(m)Multiple objects can be created from the same class.
True.


© 2020 Garbage Valuegarbage value logo