Verityprep
Question Bank

AP® Computer Science A FRQ Practice: Free-Response Questions with Solutions

Work through AP Computer Science A free-response questions unit by unit, then check each answer against a worked solution.

Free · no sign-up Open questions need no account. Sign up or log in to open the rest.

Questions 91–100 of 329
  1. 91
  2. 92
  3. 93
  4. 94
  5. 95
  6. 96
  7. 97
  8. 98
  9. 99
  10. 100

Question 91

Free response Unit 1: Using Objects and Methods
This problem involves writing methods that examine a password for security requirements. The declaration of the PasswordChecker class is shown below. public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 92

Free response Unit 1: Using Objects and Methods
This problem involves writing methods that format and inspect a sentence. The declaration of the TextFormatter class is shown below. public class TextFormatter…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 93

Free response Unit 1: Using Objects and Methods
This question simulates the discharge of a phone battery as apps are used over the course of a day. The following BatterySimulator class tracks the current…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 94

Free response Unit 1: Using Objects and Methods
This question involves a multi-floor parking garage where vehicles can occupy a single spot or a block of consecutive spots. Each floor of the garage has 30…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 95

Free response Unit 1: Using Objects and Methods
This question involves parts used to assemble toy vehicles. Each toy vehicle is assembled using one base and either two or four wheels. The following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 96

Free response Unit 2: Selection and Iteration
You and your date are trying to get a table at a restaurant. The parameter "you" is the stylishness of your clothes, in the range 0..10, and "date" is the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 97

Free response Unit 2: Selection and Iteration
The squirrels in Palo Alto spend most of the day playing. In particular, they play if the temperature is between 60 and 90 (inclusive). Unless it is summer,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 98

Free response Unit 2: Selection and Iteration
You are driving a little too fast, and a police officer stops you. Write code to compute the result, encoded as an int value: 0=no ticket, 1=small ticket, 2=big…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 99

Free response Unit 2: Selection and Iteration
Given 2 ints, a and b, return their sum. However, sums in the range 10..19 inclusive, are forbidden, so in that case just return 20.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 100

Free response Unit 2: Selection and Iteration
Given a day of the week encoded as 0=Sun, 1=Mon, 2=Tue, ...6=Sat, and a boolean indicating if we are on vacation, return a string of the form "7:00" indicating…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 91 of 329
Page 10 of 33