OOP Chapter One
OOP Chapter One
Page 2
7. What does structured programming emphasize?
A. Global data sharing.
B. Nested control structures.
C. Asynchronous events.
D. Function nesting.
Page 3
Solution: Correct Answer: A
Explanation: Page 2 defines logic programming as specifying a set of facts and rules
for inference, e.g., Prolog. Functional (B) uses function calls, procedural (C) uses
commands, and OOP (D) uses objects.
Page 4
A. Functional
B. Procedural
C. Event-Driven
D. Declarative
Page 5
Solution: Correct Answer: A
Explanation: Page 6 states a class is a user-defined data type for objects with similar
properties, e.g., a Fruit class for Mango and Apple. B is an object, C is procedural, and
D is not OOP.
Page 6
A. Hiding data.
B. Operations behaving differently based on data.
C. Creating classes.
D. Compiling code.
Page 7
Solution: Correct Answer: B
Explanation: Page 10 lists code reusability via inheritance as an OOP benefit, e.g.,
reusing class features. A is a procedural flaw, C is event-driven, and D is false.
Page 8
C. Compiling first.
D. Using global data.
Page 9
32. What does OOP enable for upgrades?
A. Complex upgrades.
B. Easy system upgrades.
C. No upgrades.
D. Only applet upgrades.
Page 10
Solution: Correct Answer: B
Explanation: Page 7 states inheritance supports hierarchical classification, e.g., a
robin as a flying bird. A, C, and D are other OOP concepts.
Page 11
C. No memory management.
D. Browser-only execution.
Page 12
A. Single-thread execution.
B. Concurrent task execution.
C. No performance gain.
D. Browser-only tasks.
Page 13
Solution: Correct Answer: B
Explanation: Page 14 defines bytecode as platform-independent code from the com-
piler, e.g., .class files. A is pre-compilation, C is platform-specific, and D is for applets.
Page 14
C. A browser.
D. A bytecode file.
Page 15