IS 128
Object Oriented Programming I
LATEST MIDTERMS REVIEW
Q&S
©2024/2025
,1. Multiple Choice: Which principle of object-oriented
programming is demonstrated by the ability of different classes to
use the same interface?
a) Encapsulation
b) Abstraction
c) Polymorphism
d) Inheritance
Correct Answer: c) Polymorphism
Rationale: Polymorphism allows objects of different classes to
be treated as objects of a common superclass, particularly through
the use of a shared interface.
2. Fill-in-the-Blank: An __________ is a blueprint from which
individual objects are created in object-oriented programming.
Correct Answer: Class
Rationale: A class is a template or blueprint that defines the
variables and the methods common to all objects of a certain kind.
3. True/False: In object-oriented programming, encapsulation is
solely concerned with the internal workings of a class and does
not affect its external interface.
Correct Answer: False
©2024/2025
, Rationale: While encapsulation does involve the internal
workings of a class, it also defines the external interface through
which the class interacts with other parts of the program.
4. Multiple Response: Select all that apply. Which of the
following are benefits of using inheritance in object-oriented
programming?
a) Code reusability
b) Increased program complexity
c) Easier maintenance
d) Tight coupling
Correct Answers: a) Code reusability, c) Easier maintenance
Rationale: Inheritance promotes code reusability and easier
maintenance by allowing new classes to adopt the properties of
existing ones. Increased program complexity and tight coupling
are generally considered disadvantages.
5. Multiple Choice: What is the term used to describe a class that
cannot be instantiated but can be subclassed?
a) Concrete class
b) Abstract class
c) Final class
d) Static class
©2024/2025
, Correct Answer: b) Abstract class
Rationale: An abstract class cannot be instantiated on its own
and is intended to be subclassed, where its methods can be
implemented.
6. Fill-in-the-Blank: The process by which one object acquires the
properties of another object is known as __________.
Correct Answer: Inheritance
Rationale: Inheritance is the mechanism in OOP by which one
class is allowed to inherit the features (properties and methods) of
another class.
7. True/False: The 'this' keyword in object-oriented programming
is used to reference the current class instance.
Correct Answer: True
Rationale: The 'this' keyword is a reference to the current object,
used within a class to refer to the current instance of that class.
8. Multiple Response: Which of the following statements are true
regarding static methods in object-oriented programming?
a) They can be called without creating an instance of the class
b) They can access instance variables directly
c) They belong to the class, rather than any object instance
©2024/2025
Object Oriented Programming I
LATEST MIDTERMS REVIEW
Q&S
©2024/2025
,1. Multiple Choice: Which principle of object-oriented
programming is demonstrated by the ability of different classes to
use the same interface?
a) Encapsulation
b) Abstraction
c) Polymorphism
d) Inheritance
Correct Answer: c) Polymorphism
Rationale: Polymorphism allows objects of different classes to
be treated as objects of a common superclass, particularly through
the use of a shared interface.
2. Fill-in-the-Blank: An __________ is a blueprint from which
individual objects are created in object-oriented programming.
Correct Answer: Class
Rationale: A class is a template or blueprint that defines the
variables and the methods common to all objects of a certain kind.
3. True/False: In object-oriented programming, encapsulation is
solely concerned with the internal workings of a class and does
not affect its external interface.
Correct Answer: False
©2024/2025
, Rationale: While encapsulation does involve the internal
workings of a class, it also defines the external interface through
which the class interacts with other parts of the program.
4. Multiple Response: Select all that apply. Which of the
following are benefits of using inheritance in object-oriented
programming?
a) Code reusability
b) Increased program complexity
c) Easier maintenance
d) Tight coupling
Correct Answers: a) Code reusability, c) Easier maintenance
Rationale: Inheritance promotes code reusability and easier
maintenance by allowing new classes to adopt the properties of
existing ones. Increased program complexity and tight coupling
are generally considered disadvantages.
5. Multiple Choice: What is the term used to describe a class that
cannot be instantiated but can be subclassed?
a) Concrete class
b) Abstract class
c) Final class
d) Static class
©2024/2025
, Correct Answer: b) Abstract class
Rationale: An abstract class cannot be instantiated on its own
and is intended to be subclassed, where its methods can be
implemented.
6. Fill-in-the-Blank: The process by which one object acquires the
properties of another object is known as __________.
Correct Answer: Inheritance
Rationale: Inheritance is the mechanism in OOP by which one
class is allowed to inherit the features (properties and methods) of
another class.
7. True/False: The 'this' keyword in object-oriented programming
is used to reference the current class instance.
Correct Answer: True
Rationale: The 'this' keyword is a reference to the current object,
used within a class to refer to the current instance of that class.
8. Multiple Response: Which of the following statements are true
regarding static methods in object-oriented programming?
a) They can be called without creating an instance of the class
b) They can access instance variables directly
c) They belong to the class, rather than any object instance
©2024/2025