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

IT210 Object Oriented Programming Midterm Exam Review 2025 (Qns & Ans)

Rating
-
Sold
-
Pages
24
Uploaded on
06-05-2025
Written in
2024/2025

IT210 Object Oriented Programming Midterm Exam Review 2025 (Qns & Ans)IT210 Object Oriented Programming Midterm Exam Review 2025 (Qns & Ans)IT210 Object Oriented Programming Midterm Exam Review 2025 (Qns & Ans)











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

Document information

Uploaded on
May 6, 2025
Number of pages
24
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown

Subjects

Content preview

IT210

Object Oriented Programming

3.0 Credits

Midterm Exam Review (Qns & Ans)

2025




©2025

, Multiple Choice Questions

1. Question:
In languages such as C++ that support multiple inheritance,
which issue is commonly encountered that can be resolved by
virtual (or shared) inheritance?
- a. Code redundancy
- b. Ambiguity in method resolution (the "diamond problem")
- c. Runtime polymorphism errors
- d. Inefficient memory allocation

ANS:
b. Ambiguity in method resolution (the "diamond problem")

Rationale:
In multiple inheritance, the diamond problem occurs when a
derived class inherits from two classes that both inherit from a
common base. Virtual inheritance helps resolve this ambiguity by
ensuring that only one instance of the common base is included.

2. Question:
In Java, the overriding of methods defined in a superclass to
provide specialized behavior in a subclass is an example of:
- a. Encapsulation
- b. Overloading
- c. Dynamic polymorphism
- d. Static binding

ANS:
c. Dynamic polymorphism

Rationale:
Dynamic polymorphism (or runtime polymorphism) occurs when a
subclass overrides a method of its superclass, and the call is
resolved at runtime based on the actual object type.

3. Question:
©2025

, Which SOLID principle states that a class should have only one
reason to change?
- a. Open/Closed Principle
- b. Liskov Substitution Principle
- c. Single Responsibility Principle
- d. Dependency Inversion Principle

ANS:
c. Single Responsibility Principle

Rationale:
The Single Responsibility Principle emphasizes that a class
should have only one responsibility or reason to change, promoting
high cohesion and low coupling.

4. Question:
What is the primary advantage of using an abstract class in
OOP?
- a. It allows multiple inheritance across different classes
- b. It provides a common base with some implemented behavior
while enforcing a contract for subclasses
- c. It guarantees runtime performance improvements
- d. It automatically supports operator overloading

ANS:
b. It provides a common base with some implemented behavior
while enforcing a contract for subclasses

Rationale:
Abstract classes allow you to define some common behavior for
all subclasses while also declaring abstract methods that must be
implemented, ensuring a consistent interface.

5. Question:
Which of the following is an advantage of using composition over
inheritance in object-oriented design?
- a. It enables dynamic behavior changes at runtime
- b. It simplifies the syntax of class definitions
©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.
emiliophd Walden University
View profile
Follow You need to be logged in order to follow users or courses
Sold
177
Member since
2 year
Number of followers
46
Documents
4725
Last sold
3 days ago

Hi there! I\'m a former nursing student who loves to share my knowledge and experience with others. I have a collection of past study notes and papers for nursing and other programs that I sell at affordable prices. Whether you need help with anatomy, pharmacology, ethics, or anything else, I have something for you. My notes are clear, concise, and fun to read. They will make your learning easier and more enjoyable. Plus, you\'ll get to see some of my witty comments and jokes along the way. Trust me, you won\'t regret buying from me!

Read more Read less
3.5

19 reviews

5
6
4
5
3
4
2
0
1
4

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