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 141–150 of 225
  1. 141
  2. 142
  3. 143
  4. 144
  5. 145
  6. 146
  7. 147
  8. 148
  9. 149
  10. 150

Question 141

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 142

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 143

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 144

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 145

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

Free response Arraylists
An opening and a closing delimiter are distinct nonempty strings. Input tokens contain either one exact delimiter or ordinary text. Balanced delimiters never…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 147

Free response Arraylists
A high school club maintains information about its members in a MemberInfo object. A MemberInfo object stores a club member's name, year of graduation, and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 148

Free response Arraylists
Users of a website are asked to provide a review of the website at the end of each visit. Each review, represented by an object of the Review class, consists of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 149

Free response Arraylists
This question involves the analysis of weather data. The following WeatherData class has an instance variable, temperatures, which contains the daily high…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 150

Multiple choice Arraylists
ArrayList<String> list = new ArrayList<String>(); list.add("A"); list.add("B"); list.add("C"); for (String s : list) { String t =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 141 of 225
Page 15 of 23