APCSA Unit 5 refresher

APCSA Unit 5 refresher

9th Grade

23 Qs

quiz-placeholder

Similar activities

Web Dev Diagnostic

Web Dev Diagnostic

7th - 10th Grade

20 Qs

Aplikom

Aplikom

1st Grade - University

20 Qs

IT (data, viruses and more)

IT (data, viruses and more)

8th Grade - Professional Development

20 Qs

ICT WEBINAR QUIZ

ICT WEBINAR QUIZ

KG - Professional Development

20 Qs

End of unit assessment - Networks

End of unit assessment - Networks

9th Grade

18 Qs

Standard Linux Commands

Standard Linux Commands

1st - 10th Grade

20 Qs

Personal Finance 3.01-3.07 Review Quiz

Personal Finance 3.01-3.07 Review Quiz

9th - 12th Grade

20 Qs

Selection

Selection

5th - 9th Grade

20 Qs

APCSA Unit 5 refresher

APCSA Unit 5 refresher

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Thomas Wright

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

23 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The return type of an accessor method

is void

must be a user defined class

must be a primitive

must match the type of the instance variable being accessed

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The purpose of an accessor method is

to modify an instance variable

to return the value of an instance variable

to return the values of all of the instance variables

to allow the user to have direct access to an instance variable

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true?

Both primitives and objects are returned by value.

Both primitives and objects are returned by reference.

Primitives are returned by value. Objects are returned by reference.

Objects are returned by value. Primitives are returned by reference.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Accessors and mutators are used to

Allow private data to be accessed outside of the class and be safely modified.

Allow users to access and modify any of the class’s data in any way they wish.

Prevent users from manipulating private data.

Allow public data to be accessed and safely modified.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The return type of a mutator method

is usually void

must match the type of of the instance variable being mutated

must be a primitive

must be a user defined class

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a benefit of using a mutator method?

Only methods outside of the class can change an instance variable’s value

Mutator methods can verify the new value is a valid value for the instance variable

The user can change all of the instance variables using the same mutator method

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Classes’ access specifier is generally set to

private to prevent any user from accessing and modifying any instance variables.

private so that only certain users can create objects of the class.

public so that all data and methods are accessible by any user.

public so that any user can create and use objects of the class.

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers