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

COMP 1231 Final Question and answers correctly solved 2025

Rating
-
Sold
-
Pages
17
Grade
A+
Uploaded on
13-08-2025
Written in
2025/2026

COMP 1231 Final Question and answers correctly solved 2025 is-a relationship - correct answer One object is type of another. has-a relationship - correct answer One object has reference to another. superclass, parent class, base class - correct answer The original class that is used to derive a new class using inheritance. child class, subclass - correct answer A class that is derived from another class. super - correct answer Used to refer to the parent class in a child class. Often used to invoke the parent's constructor (not inherited). access control modifiers - correct answer Keywords that are added to definitions to control access to them. default/no modifier - correct answer access control modifier - visible to the package private modifier - correct answer access control modifier - visible to the class only public modifier - correct answer access control modifier - visible to the world

Show more Read less
Institution
COMP 1231
Course
COMP 1231










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

Written for

Institution
COMP 1231
Course
COMP 1231

Document information

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

Subjects

Content preview

COMP 1231 Final Question and
answers correctly solved 2025
is-a relationship - correct answer ✔One object is type of another.


has-a relationship - correct answer ✔One object has reference to another.


superclass, parent class, base class - correct answer ✔The original class
that is used to derive a new class using inheritance.


child class, subclass - correct answer ✔A class that is derived from another
class.


super - correct answer ✔Used to refer to the parent class in a child class.
Often used to invoke the parent's constructor (not inherited).


access control modifiers - correct answer ✔Keywords that are added to
definitions to control access to them.


default/no modifier - correct answer ✔access control modifier - visible to the
package


private modifier - correct answer ✔access control modifier - visible to the
class only


public modifier - correct answer ✔access control modifier - visible to the
world

,protected modifier - correct answer ✔access control modifier - visible to the
package and all subclasses - shown with a # symbol preceding them in UML
diagrams


static variable - correct answer ✔A variable that exists independently of any
instances created for the class. Only one copy of the variable exists
regardless of the number of instances of the class.


static method - correct answer ✔A method that exists independently of any
instances created for the class.


final variable - correct answer ✔A variable that cannot be modified once
initialized.


final method - correct answer ✔A method that cannot be overridden by any
subclasses.


final class - correct answer ✔A class that cannot be inherited.


abstract class - correct answer ✔A class that can never be instantiated. Its
sole purpose is to be extended. Does not need to contain abstract methods.
The child of an abstract class must override the abstract methods of the
parent, or it too will be considered abstract.


abstract method - correct answer ✔A method declared without any
implementation. The implementation is provided by the subclass.


object class - correct answer ✔All Java classes are subclasses of this class.
Defined in the java.lang package of the Java standard class library.

, String toString() - correct answer ✔This method is defined in the Object class
to return a string representation of the object. We often override this to provide
important information when printing an object.


boolean equals (Object obj) - correct answer ✔This method is defined in the
Object class to return true if this object is an alias of the specified object.


Object clone () - correct answer ✔This method is defined in the Object class
to return a copy of this object.


extends - correct answer ✔Used to establish an inheritance relationship.


mutator method - correct answer ✔Used to modify an existing variable.


accessor method - correct answer ✔Used to access an existing variable


overriding methods - correct answer ✔A child class can override the
definition of an inherited method in favor of its own. The new method must
have the same signature as the parent's method, but can have a different
body. The type of object executing the method determines which version of
the method is invoked.


shadowing variables - correct answer ✔overriding a variable - generally
should avoid doing this


overloading - correct answer ✔Deals with multiple methods with the same
name in the same class, but with different signatures. Lets you define a similar
operation in different ways for different parameters.

Get to know the seller

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.
LEWISSHAWN55 Yale University
View profile
Follow You need to be logged in order to follow users or courses
Sold
87
Member since
2 year
Number of followers
46
Documents
7223
Last sold
1 week ago
THE SHOP FOR EXAMS,TESTBANKS,AQA, WHAT YOU STUDY AND WISH TO PASS THEN COME AND CHECK FOR YOUR NEED ......

WANT TO PASS YOUR EXAMS??? IF YES CHECK OUT MY ACCOUNT FOR ALL YOUR EXAMS NEED BE IT NURSING,REALTORS, HUMAN RESOURCE,MATHS,BIOLOGY,WGU,ICT, YOU BETTER CHECK MY ACCOUNT FOR MORE IF YOU GET WHAT U WANT THEN FEEL FREE TO PURCHASE AT A BETTER PRICE........

3.1

10 reviews

5
5
4
0
3
0
2
1
1
4

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 notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions