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

CSC 142 Final Exam | Questions and Answers | Fall Update | 100% Correct ;

Document preview thumbnail
Preview 2 out of 14 pages

CSC 142 Final Exam | Questions and Answers | Fall Update | 100% Correct ;

Content preview

CSC 142 Final Exam | Questions and
Answers | Fall Update | 100% Correct ;

We keep mentioning the concept of scope., which of the following describes at best what the
scope of a local variable?

the entire java file.
inside the class, and inside every method.
inside the parentheses of a method signature.
the method in which the local variable is defined. - ANSWER>>the method in which the local
variable is defined.

It is highly recommended and for privacy and security, that in object-oriented programming to
make all of a class's

instance variables public
methods public
instance variables and methods public
instance variables private - ANSWER>>instance variables private

Let's take a look bac again to our House Catalogues analogy example. We can think of a class as
a design/blueprint that describes a given house and ________ are instantiated of that house
built from the blueprint.

attributes
methods
fields
objects - ANSWER>>objects

A SETTER method is a method that accepts a value from a class's instance variable and does not
change.

True
False - ANSWER>>False

The access specifier(public, private) is needed to control how the class may be accessed.

True
False - ANSWER>>True

, What do we call a group of related classes? In NetBeans for example, we do that to keep our
code organized.

archive
attachment
collection
package - ANSWER>>package

We invoke the key word new in order to?

create an object that represents a given class
assign a new variable in memory
completely create a new class
create a new Java file - ANSWER>>create an object that represents a given class

The private access specifier for class member (instance variable, method) specifies that the field
may can't be accessed by written code outside the class.

True
False - ANSWER>>True

In Java, a method

may have two parameters or more
must have at least one parameter variables.
never accepts parameter variables.
may have none or many parameter variables. - ANSWER>>may have none or many parameter
variables.

et's do some UML study, If you read the following method, what does it mean?
+ setTicektNumber(price:double) : void

a public method that accepts a double data type and does not return a value
a public field called TicketNumber that is designed as a double data type
a private field called TicketNumber that is designed as a double data type
a private method that accepts a double data type and does not return a value - ANSWER>>a
public method that accepts a double data type and does not return a value

A GET method is the one that saves a passed value in a class's field or somehow changed the
value of an instance variable .

True
False - ANSWER>>False

Document information

Uploaded on
December 9, 2025
Number of pages
14
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.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
1
Items
1719
Last sold
1 year 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