Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections FRQ

Work through AP Computer Science A free-response questions on Data Collections, 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 51–60 of 143
  1. 51
  2. 52
  3. 53
  4. 54
  5. 55
  6. 56
  7. 57
  8. 58
  9. 59
  10. 60

Question 51

Free response Arraylists
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 52

Free response Arraylists
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 53

Free response Arraylists
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 54

Free response Arraylists
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 55

Free response Arrays
Trail elevations are recorded at regularly spaced markers in the int array markers. Ignore slopes between the markers. public class Trail { private int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 56

Free response Arrays
Sound stores digital samples as integers. Implement two independent methods. public class Sound { private int[] samples; // nonnull public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 57

Free response 2D Arrays
In this question you will write two methods for a class RouteCipher that encrypts (puts into a coded form) a message by changing the order of the characters in…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 58

Free response Arraylists
ClimbInfo stores peak name and climb time. ClimbingClub stores nonnull ClimbInfo objects in climbList. Parts(a) and(b) are alternative implementations of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 59

Free response 2D Arrays
A grayscale image is represented by a 2-dimensional rectangular array of pixels (picture elements). A pixel is an integer value that represents a shade of gray.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 60

Free response Arraylists
DownloadInfo stores a unique song title and a download count initially1; incrementTimesDownloaded increases that count. MusicDownloads holds a list with no…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 51 of 143
Page 6 of 15