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 9 pages
Exam (elaborations)

LATEST REVATURE STUDY GUIDE QUESTIONS WITH 100% CORRECT ANSWERS

Document preview thumbnail
Preview 2 out of 9 pages

LATEST REVATURE STUDY GUIDE QUESTIONS WITH 100% CORRECT ANSWERS LATEST REVATURE STUDY GUIDE QUESTIONS WITH 100% CORRECT ANSWERS

Content preview

LATEST REVATURE STUDY GUIDE 2024-2025
QUESTIONS WITH 100% CORRECT ANSWERS
What are the 4 pillars of OOP?: AbstractionEncapsulation

Inheritance Polymorphism

What is abstraction?: Abstraction is a process of hiding the implementation details and

showing only functionality to the user. Abstraction lets you focus on whatthe object does

instead of how it does it.

What is an Inheritence?: •A class (child) can gain another class's (parent's)features

(fields and methods) by extending the parent class.

Child is allowed to add own fields and methods

Doesn't inherit private fields or methods

Interfaces are a form of inheritance

Creates an IS-A relationship

What are the different types of Inheritance?: Single InheritanceMultilevel Inheritance

Hierarchical Inheritance Multiple Inheritance

What is a Single Inheritance?: A subclass inherits methods and attributes fromone

superclass

What is a Multilevel Inheritance?: Derived class will be inheriting a base classand acts

as the base class for other classes

What is a Hierarchical Inheritance?: Multiple subclasses inherit from one su-perclass

What is a Multiple Inheritance?: One class can inherit from more than onesuperclass

What is Polymorphism?: The ability for some code structures (method or objectto be

treated as different structures at runtime.

What is Casting?: When a value of one type is assigned another type.

, LATEST REVATURE STUDY GUIDE 2024-2025
QUESTIONS WITH 100% CORRECT ANSWERS
(NewType) myVar

What are the different types of Casting?: UpcastingDowncasting

What is Upcasting?: Storing a reference to an object in a base-class-typed(less specific)

reference variable



Animal firstRef = new Dog(); //upcast

What is Downcasting?: Take a previously upcasted reference and store thatreference in

reference variable that is a type closer to that of the actual object

Dog secRef = (Dog) firstRef; //downcast

What is Encapsulation?: Mechanism of wrapping data (variables) and codeacting on the

data (methods) together as a single unit.

Allows data hiding or restriction of data from being accessed outside of the class directly.

What are the different access modifiers in Encapsulation?: PublicProtected

PrivateDefault

What is the Public access modifier?: Seen by other classes no matter thepackage

What is the Protected access modifier?: Seen by subclasses or by classeswith same

package

What is the Private access modifier?: Seen by same class only

What is the Default access modifier?: Seen by any subclass or class in samepackage

What are Classes?: Template used to instantiate objects. Determines statesand behavio

an object will possess.

What is an Object?: An instance of a class in memory.

Document information

Uploaded on
August 13, 2024
Number of pages
9
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$15.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.
Courseinstructor
4.5
(26)
Sold
137
Followers
61
Items
2012
Last sold
1 day 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