Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 35 pages
Class notes

IS 128 ( Object Oriented Programming I) Latest Midterms Review Q & S 2024

Document preview thumbnail
Preview 4 out of 35 pages

IS 128 ( Object Oriented Programming I) Latest Midterms Review Q & S 2024IS 128 ( Object Oriented Programming I) Latest Midterms Review Q & S 2024IS 128 ( Object Oriented Programming I) Latest Midterms Review Q & S 2024

Content preview

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

Document information

Uploaded on
November 21, 2024
Number of pages
35
Written in
2024/2025
Type
Class notes
Professor(s)
Unknown
Contains
All classes
$12.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
EmilioOchieng
4.1
(24)
Sold
148
Followers
17
Items
4032
Last sold
3 months ago


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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions