Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Practice Questions

Work through AP Computer Science A practice 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.

Subtopic: Arraylists Clear filter

Questions 131–140 of 225
  1. 131
  2. 132
  3. 133
  4. 134
  5. 135
  6. 136
  7. 137
  8. 138
  9. 139
  10. 140

Question 131

Free response Arraylists
In an International ballroom dancing competition, competitors are scored by a panel of judges on a scale from 0 to 100. The final score for each couple is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 132

Multiple choice Arraylists
Consider the following Java class field and method: private List<Integer> list; public void mystery(int n) { for (int i = 0; i < n; i++) { Object obj =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 133

Multiple choice Arraylists
Consider the execution of the following Java code, which manipulates an ArrayList of strings: List<String> list = new ArrayList<String>(); list.add("a");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 134

Multiple choice Arraylists
Consider the following code segment: ArrayList<String> list1 = new ArrayList<String>(); list1.add("a"); list1.add("b"); list1.add(0, "c");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 135

Multiple choice Arraylists
Consider the following declaration of the class RandomList, which has a constructor intended to initialize the instance variable numList to an ArrayList of n…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 136

Free response Arraylists
This question involves the manipulation and analysis of a list of words. The following WordChecker class contains an ArrayList<String> to be analyzed and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 137

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

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

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 140

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 131 of 225
Page 14 of 23