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

CSE 1322 EXAM 3 FULL REVISION NOTES WITH OBJECT-ORIENTED PROGRAMMING AND JAVA FUNDAMENTALS CONCEPTS

Document preview thumbnail
Preview 4 out of 47 pages

CSE 1322 EXAM 3 FULL REVISION NOTES WITH OBJECT-ORIENTED PROGRAMMING AND JAVA FUNDAMENTALS CONCEPTS

Content preview

CSE 1322 EXAM 3 FULL REVISION NOTES WITH
OBJECT-ORIENTED PROGRAMMING AND JAVA
FUNDAMENTALS CONCEPTS

◉ When should inheritance be used?
Answer: when classes are similar


◉ What does inheritance support?
Answer: through an extended / derived class supports code reuse.


◉ A method override occurs when two methods in the same class
have the exact same method signature. True or False?
Answer: False


◉ toString( )(Java) or ToString() (C#) is a method that is in the
Object class that is inherited by all Java / C# classes. True or False?
Answer: True


◉ When a set of methods have the same name but different
types/number of parameters in the same class, they are called:
Answer: Overloaded methods

,◉ Abstract methods are used in defining
Answer: classes that need no methods implemented


◉ he reserved word super (in Java) or base (in C#). <method name>
is used call the method which is defined in
Answer: the parent class


◉ A class can inherit from the methods from its classes.
Answer: super, parent, abstract, or interfaces


◉ What is the goal of encapsulation?
Answer: To hide the values or state of a structured an object inside a
class, preventing unauthorized direct access to them


◉ Since toString() is a method that is in the Object class, any call to
the toString() method refers to the toString( ) method in the Object
class unless
Answer: specifically overridden in the child class


◉ The unique feature of an abstract class is that
Answer: a subclass that extends it doesn't need to have the abstract
reserved word in its declaration.

,◉ In a UML diagram, the arrows
Answer: point up to classes they inherit from


◉ What does @Override do?
Answer: tells the compiler to check the override is correct


◉ Equals(Object) Method
Answer: Determines whether the specified object is equal to the
current object.


◉ Equals(Object, Object) Method
Answer: Determines whether the specified object instances are
considered equal.


◉ Finalize( ) Method
Answer: - if you wish to execute code just before an object is
destroyed by the garbage collector, create a _______ method in the
class and place the code there
- accepts no arguments
- void return type
Allows an object to try to free resources and perform other cleanup
operations before it is reclaimed by garbage collection.

, ◉ GetHashCode( ) Method
Answer: Serves as the default hash function


◉ GetType( ) Method
Answer: Gets the Type of the current instance


◉ MemberwiseClone( ) Method
Answer: Creates a shallow copy of the current Object


◉ ReferenceEquals(Object, Object) Method
Answer: Determines whether the specified Object instances are the
same instance


◉ ToString( ) Method
Answer: Returns a string that represents the current object


◉ clone( ) Method
Answer: makes a new object with the same state as an existing
object and creates and returns a copy of this object


◉ equals(Object obj) Method
Answer: Indicates whether some other object is "equal to" this one

Document information

Uploaded on
August 25, 2026
Number of pages
47
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$14.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.
TopGradeInsider
4.2
(13)
Sold
165
Followers
2
Items
55375
Last sold
10 hours 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