100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

IS 128 Object Oriented Programming I (HU) Midterms Exam Review 2025 (Qns & Ans).

Rating
-
Sold
-
Pages
32
Uploaded on
13-03-2025
Written in
2024/2025

IS 128 Object Oriented Programming I (HU) Midterms Exam Review 2025 (Qns & Ans).IS 128 Object Oriented Programming I (HU) Midterms Exam Review 2025 (Qns & Ans).IS 128 Object Oriented Programming I (HU) Midterms Exam Review 2025 (Qns & Ans).

Show more Read less











Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
March 13, 2025
Number of pages
32
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown

Subjects

Content preview

IS 128

Object-Oriented Programming I

Midterms Exam Review (Qns & Ans)

2025



1. Which of the following is a key benefit of encapsulation in
object-oriented programming?
A. Allows direct access to class fields
B. Hides implementation details and protects object state
C. Improves data storage efficiency
D. Enables the creation of abstract classes
- ANS: B. Hides implementation details and protects object
state
- Rationale: Encapsulation restricts direct access to object
fields, ensuring controlled interaction through methods.

©2025

,2. What is the primary purpose of polymorphism in OOP?
A. To reduce memory consumption
B. To allow a single interface to represent different data types or
classes
C. To simplify debugging processes
D. To store objects in arrays
- ANS: B. To allow a single interface to represent different
data types or classes
- Rationale: Polymorphism enables code flexibility by
allowing a single method or interface to work with different types
of objects.


3. In object-oriented programming, what is the term for creating
a new class based on an existing class?
A. Encapsulation
B. Composition
C. Inheritance
D. Abstraction
- ANS: C. Inheritance
- Rationale: Inheritance allows a new class (child) to acquire
properties and behaviors of an existing class (parent).

©2025

,4. Which of the following defines an abstract class?
A. A class with only static methods
B. A class that cannot be instantiated and includes at least one
abstract method
C. A class with private fields only
D. A class that implements an interface
- ANS: B. A class that cannot be instantiated and includes at
least one abstract method
- Rationale: Abstract classes serve as blueprints for other
classes and cannot be instantiated directly.


5. What does the "this" keyword refer to in object-oriented
programming?
A. The parent class
B. The current instance of the class
C. A static class variable
D. An unrelated object
- ANS: B. The current instance of the class
- Rationale: The "this" keyword is used to refer to the current
object within a method or constructor.


©2025

, ---


Fill-in-the-Blank Questions
6. __________ is the principle that allows a derived class to
override a method in its base class with a new implementation.
- ANS: Method Overriding
- Rationale: Method overriding occurs when a subclass
provides its own implementation for a method defined in its
parent class.


7. In OOP, __________ is a design pattern that ensures a class
has only one instance and provides a global access point to it.
- ANS: Singleton
- Rationale: The Singleton pattern restricts a class to a single
instance, often used in resource management.


8. The __________ relationship in object-oriented programming
is characterized by "is-a" hierarchy, such as a car being a type of
vehicle.
- ANS: Inheritance
- Rationale: The "is-a" relationship defines inheritance,
where a subclass inherits properties and behaviors from a
superclass.


©2025

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Examiner651 Freelance
View profile
Follow You need to be logged in order to follow users or courses
Sold
19
Member since
3 year
Number of followers
5
Documents
3731
Last sold
1 week ago

5.0

2 reviews

5
2
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions