
APCSA Barrons Practice exam 2

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
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
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
Refer to the following method.
What value does mystery(4) return?
3
9
12
27
81
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
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
Similar Resources on Wayground
40 questions
SOALAN PERCUBAAN TEORI (SET 1)

Quiz
•
12th Grade
42 questions
ICT SPM : LA3 (Rangkaian Komputer)

Quiz
•
10th - 12th Grade
35 questions
Python - 2.தரவு அருவமாக்கம்

Quiz
•
12th Grade
35 questions
THEORY TEST DBC20012

Quiz
•
University
35 questions
Python - 6.கட்டுப்பாட்டுக் கட்டமைப்புகள்

Quiz
•
12th Grade
45 questions
FullStack Django - [26 Apr 24] TEST - 2

Quiz
•
University
36 questions
AP CS A unit 1

Quiz
•
11th Grade - University
35 questions
CodeChef (Secret Snippet)

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade