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 241–250 of 329
  1. 241
  2. 242
  3. 243
  4. 244
  5. 245
  6. 246
  7. 247
  8. 248
  9. 249
  10. 250

Question 241

Free response Unit 4: Data Collections
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 242

Free response Unit 4: Data Collections
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 243

Free response Unit 4: Data Collections
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 244

Free response Unit 4: Data Collections
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 245

Free response Unit 4: Data Collections
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 246

Free response Unit 4: Data Collections
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 247

Free response Unit 4: Data Collections
A multiplayer game called Token Pass has the following rules. Each player begins with a random number of tokens (at least 1, but no more than 10) that are…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 248

Free response Unit 4: Data Collections
A telescope scans a rectangular area of the night sky and collects the data into a 1-dimensional array. Each data value scanned is a number representing the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 249

Free response Unit 4: Data Collections
Digits stores the decimal digits of a nonnegative int in original left-to-right order. public class Digits { private ArrayList digitList public Digits(int num)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 250

Free response Unit 4: Data Collections
This question involves reasoning about a two-dimensional (2D) array of integers. You will write two static methods, both of which are in a single enclosing…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 241 of 329
Page 25 of 33