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

CS 151 Exam 1 Question And Answer 2025/2026

Rating
-
Sold
-
Pages
3
Grade
A+
Uploaded on
13-09-2025
Written in
2025/2026

Advantages of object oriented programming - correct answer - provides clear structure - avoids repetition - possible to create fully reusable applications - less code, shorter dev time Constructor, 2 types - correct answer Special method which shares the name of the class, serves the purpose of initializing objects. Default - no parameters Parameterized - takes args Copy constructor - correct answer a constructor that accepts an object of the same class as an argument Constructor chaining - correct answer Using this() or super(), calls another constructor from within a constructor. 4 pillars of OOP - correct answer Abstraction — we try to obtain an abstract view of the problem, reducing unnecessary details. Encapsulation — process of combining data and functions into a single class. Data not accessed directly, accessed thru functions present inside the class. Data hiding. Inheritance — a class is based on another class and uses data/implementation of the other class. Used for reusability. Polymorphism — the ability to present the same interface for differing underlying data types. Each class has different underlying data, but the interface/superclass groups them all together, allowing them to be used in a single data structure. Overloading - correct answer Two or more methods/constructors with the same name but different numbers or types of parameters, or both. Cannot overload by return type. An example of compiler time polymorphism. Stack memory - correct answer Used for static memory allocation and execution of a thread. Contains primitive values and references to objects. Accessed in LIFO order

Show more Read less
Institution
CS 151
Module
CS 151








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

Written for

Institution
CS 151
Module
CS 151

Document information

Uploaded on
September 13, 2025
Number of pages
3
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CS 151 Exam 1 Question And Answer 2025/2026

Advantages of object oriented programming - correct answer - provides clear structure
- avoids repetition
- possible to create fully reusable applications
- less code, shorter dev time

Constructor, 2 types - correct answer Special method which shares the name of the
class, serves the purpose of initializing objects.

Default - no parameters
Parameterized - takes args

Copy constructor - correct answer a constructor that accepts an object of the same
class as an argument

Constructor chaining - correct answer Using this() or super(), calls another constructor
from within a constructor.

4 pillars of OOP - correct answer Abstraction — we try to obtain an abstract view of the
problem, reducing unnecessary details.

Encapsulation — process of combining data and functions into a single class. Data not
accessed directly, accessed thru functions present inside the class. Data hiding.

Inheritance — a class is based on another class and uses data/implementation of the
other class. Used for reusability.

Polymorphism — the ability to present the same interface for differing underlying data
types. Each class has different underlying data, but the interface/superclass groups
them all together, allowing them to be used in a single data structure.

Overloading - correct answer Two or more methods/constructors with the same name
but different numbers or types of parameters, or both.

Cannot overload by return type.

An example of compiler time polymorphism.

Stack memory - correct answer Used for static memory allocation and execution of a
thread.

Contains primitive values and references to objects.

Accessed in LIFO order
£13.32
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
MAINAAJR

Get to know the seller

Seller avatar
MAINAAJR Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
1 year
Number of followers
1
Documents
79
Last sold
-

0.0

0 reviews

5
0
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 exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions