APCSA Barrons Practice exam 2

APCSA Barrons Practice exam 2

12th Grade - University

40 Qs

quiz-placeholder

Similar activities

CIA VIVA- Practical & Theory

CIA VIVA- Practical & Theory

University

40 Qs

Python set 2

Python set 2

9th - 12th Grade

42 Qs

Test

Test

University

35 Qs

I/O and Operators in C

I/O and Operators in C

University

43 Qs

[Q] Chapter 5 - System Software

[Q] Chapter 5 - System Software

University

41 Qs

OS Quiz 2 LH18

OS Quiz 2 LH18

University

45 Qs

AP CSA Review Set #1

AP CSA Review Set #1

9th - 12th Grade

37 Qs

Intro to Java Exam Review

Intro to Java Exam Review

9th - 12th Grade

40 Qs

APCSA Barrons Practice exam 2

APCSA Barrons Practice exam 2

Assessment

Quiz

Computers

12th Grade - University

Hard

Used 80+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

A large java program was tested extensively, and no errors were found. What can be concluded?

All of the preconditions in the program are correct

All of the postconditions in the program are correct

the program may have bugs

the program has no bugs

every method in the program may safely be used in other programs

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Refer to the incrementWage method. Which of the following is a correct /*implementation of incrementWage*/?

return hourlyWage + amt;

return getHourlyWage() + amt;

hourlywage += amt;

getHourlyWage() += amt;

hourlyWage = amt;

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Consider the method changeUnionStatus. Which is a correct /*implementation of changeUnionStatus*/?

I only

II only

III only

I and II only

I, II, and III only

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

A client method computePay will return a worker’s pay based on the number of hours worked.


Which replacement for /* code*/ is correct?

return hourlyWage * hours;

return getHourlyWage()*hours

return w.getHourlyWage () * hours;

return w.hourlyWage * hours;

return w.getHourlyWage() * w.hours;

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Consider this program segment. You may assume that word List has been declared as ArrayList<String>.

What is the maximum number of times that SHORT WORD can be printed?

3

4

wordList.size()

wordList.size() -1

s.length()

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Refer to the following method.

What value does mystery(4) return?

3

9

12

27

81

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Refer to the following declarations:


Which of the following correctly assigns the elements of the colors array to colorList? The final ordering of colors in colorList should be the same as in the colors array.

I only

II only

III only

II and III only

I,II, and III

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?