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 231–240 of 329
  1. 231
  2. 232
  3. 233
  4. 234
  5. 235
  6. 236
  7. 237
  8. 238
  9. 239
  10. 240

Question 231

Free response Unit 4: Data Collections
WordList stores strings of letters in myList. Implement both methods while preserving the order of words that remain. public class WordList { private ArrayList…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 232

Free response Unit 4: Data Collections
Hotel maintains rooms numbered0 through rooms.length−1 and a waiting list of guest names. A null rooms entry is unreserved; any nonnull entry is a Reservation…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 233

Free response Unit 4: Data Collections
StudentRecord holds more than one integer score. Scores have improved if every successive score is at least the preceding score. Improved records average only…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 234

Free response Unit 4: Data Collections
An appointment scheduler uses TimeInterval.overlapsWith to determine overlap. Appointment exposes its TimeInterval. DailySchedule stores a list of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 235

Free response Unit 4: Data Collections
Customers have a name and positive unique ID and are ordered by name, then ID. Implement a comparison and a two-pass intersection of sorted customer arrays.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 236

Free response Unit 4: Data Collections
A positive integer is a self-divisor when every decimal digit divides the original number. A0 digit disqualifies it. For example128 qualifies, while26 does not…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 237

Free response Unit 4: Data Collections
StudentAnswerSheet holds one-character answers in question order. A correct answer earns1 point, an incorrect answer loses0.25 point, and "?" earns0.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 238

Free response Unit 4: Data Collections
Time.minutesUntil(other) returns the signed difference from this time to other in minutes. All flights occur on the same day and are stored in chronological…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 239

Free response Unit 4: Data Collections
StringCoder encodes words as StringPart objects, each holding a starting index and length in a master string containing every alphabet letter. decodeString…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 240

Free response Unit 4: Data Collections
CookieOrder stores a cookie variety and a box count. MasterOrder holds orders, possibly several of the same variety. No CookieOrder is null. public class…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 231 of 329
Page 24 of 33