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

CS217 Object Oriented Prog Midterm Exam Review 2025 (With Solns

Rating
-
Sold
-
Pages
34
Uploaded on
08-04-2025
Written in
2024/2025

CS217 Object Oriented Prog Midterm Exam Review 2025 (With SolnsCS217 Object Oriented Prog Midterm Exam Review 2025 (With SolnsCS217 Object Oriented Prog Midterm Exam Review 2025 (With Solns












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

Document information

Uploaded on
April 8, 2025
Number of pages
34
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown

Subjects

Content preview

CS217 Object Oriented Programming

Midterm Exam Review (Qns & Ans)

2025



1. Which principle of Object-Oriented Programming ensures that
an object’s internal details are hidden from external access?
A. Polymorphism
B. Inheritance
C. Encapsulation
D. Abstraction
ANS: C. Encapsulation
Rationale: Encapsulation restricts access to an object’s internal
state, exposing only necessary functionality.


2. Which of the following describes polymorphism in OOP?

©2025

, A. Reusing code in derived classes
B. Implementing multiple methods with the same name but
different behaviors
C. Restricting object instantiation to a single instance
D. Combining multiple classes into a single object
ANS: B. Implementing multiple methods with the same
name but different behaviors
Rationale: Polymorphism enables code flexibility by allowing
a method to adapt its behavior based on its context.


3. In OOP, what is the purpose of an abstract class?
A. Creating objects directly
B. Preventing inheritance
C. Providing a base class with incomplete functionality for
subclasses to implement
D. Eliminating redundant methods
ANS: C. Providing a base class with incomplete functionality
for subclasses to implement
Rationale: Abstract classes act as templates for derived classes,
specifying methods without complete implementations.


4. Which of the following is an example of multiple inheritance?

©2025

, A. A subclass inheriting from a single parent class
B. A class inheriting properties and methods from more than
one parent class
C. An object containing multiple data attributes
D. A superclass overriding its subclass’s methods
ANS: B. A class inheriting properties and methods from
more than one parent class
Rationale: Multiple inheritance allows a class to derive
functionality from multiple parent classes.


5. What does the term "method overriding" refer to in OOP?
A. Replacing a method in a parent class with a new
implementation in a subclass
B. Defining two methods with identical signatures in the same
class
C. Hiding private methods from external access
D. Assigning default values to method arguments
ANS: A. Replacing a method in a parent class with a new
implementation in a subclass
Rationale: Method overriding enables subclass-specific
behavior by redefining a parent class method.


---
©2025

, Fill-in-the-Blank Questions
6. In object-oriented programming, ________ refers to
combining multiple data attributes and methods into a single
entity.
ANS: Class
Rationale: Classes group related attributes and methods into
one logical structure.


7. The keyword ________ is used in many OOP languages to
create an instance of a class.
ANS: new
Rationale: The `new` keyword is commonly used to instantiate
objects in languages like Java and C++.


8. The process of defining methods in a subclass with the same
name as those in the parent class is known as ________.
ANS: Overriding
Rationale: Overriding allows subclasses to provide specific
implementations for inherited methods.


9. A ________ is a special type of method used to initialize
objects of a class.

©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.
ClementeO Walden University
View profile
Follow You need to be logged in order to follow users or courses
Sold
128
Member since
3 year
Number of followers
43
Documents
5013
Last sold
3 weeks ago

3.7

16 reviews

5
9
4
0
3
3
2
1
1
3

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