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 2 out of 7 pages
Exam (elaborations)

CSE 205 Final Study-Guide UPDATED ACTUAL Exam Questions and Correct |

Document preview thumbnail
Preview 2 out of 7 pages

CSE 205 Final Study-Guide UPDATED ACTUAL Exam Questions and Correct |

Content preview

CSE 205 Final Study-Guide UPDATED
ACTUAL Exam Questions and Correct |

CSE 205 Final Exam (UPDATED)

Section 1: Object-Oriented Programming Fundamentals (Q1–15)

Q1. Which of the following best describes encapsulation?
A) Hiding implementation details and bundling data with methods
B) Allowing a class to inherit from multiple parents
C) Hiding methods from other classes using the private keyword only
D) Using interfaces to define behavior

Correct Answer: A
Rationale:

• A (Correct): Encapsulation is about bundling data (fields) and methods that operate
on that data into a single unit (class) and restricting direct access to some
components.

• B: This describes multiple inheritance, not encapsulation.

• C: Too narrow; encapsulation uses private, protected, and package-private.

• D: Interfaces relate to abstraction, not encapsulation per se.



Q2. Which access modifier allows access only within the same class?
A) public
B) protected
C) private
D) default (no modifier)

Correct Answer: C
Rationale:

• C (Correct): private members are accessible only inside the class they are declared.

• A: public → anywhere.

, • B: protected → same package + subclasses.

• D: default → same package only.



Q3–Q15 (Continue with similar style covering: constructors, this, static, method overloading,
overriding, super, polymorphism, abstraction, interfaces, enums, inner classes, etc.)



Section 2: Inheritance & Polymorphism (Q16–30)

Q16. Given classes:

java

class Animal { public void sound() { System.out.print("Animal "); } }

class Dog extends Animal { public void sound() { System.out.print("Dog "); } }

What is output?
Animal a = new Dog(); a.sound();
A) Animal
B) Dog
C) Compilation error
D) Runtime error

Correct Answer: B
Rationale: Dynamic method dispatch – even though reference type is Animal, object type is
Dog, so overridden method in Dog executes.



Q17. Which of the following is true about super keyword?
A) Calls parent class constructor
B) Accesses parent class methods/variables hidden by subclass
C) Must be first statement in constructor
D) All of the above

Correct Answer: D
Rationale: super() calls parent constructor (must be first), super.method() calls overridden
parent method, super.var accesses hidden variable.



Q18–Q30 (Cover: instanceof, casting, abstract classes vs interfaces, multiple inheritance via
interfaces, diamond problem, etc.)

Document information

Uploaded on
May 2, 2026
Number of pages
7
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$20.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

Sold
1
Followers
0
Items
129
Last sold
5 months ago



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

Working on your references?

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

Working on your references?

Frequently asked questions