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 61–70 of 225
  1. 61
  2. 62
  3. 63
  4. 64
  5. 65
  6. 66
  7. 67
  8. 68
  9. 69
  10. 70

Question 61

Free response Arraylists
A school district would like to get some statistics on its students' standardized test scores. Scores will be represented as objects of the following ScoreInfo…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 62

Free response Arraylists
A two-dimensional array of integers in which most elements are zero is called a sparse array. Because most elements have a value of zero, memory can be saved by…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 63

Free response Arraylists
A student plans to analyze product reviews found on a Web site by looking for keywords in posted reviews. The ProductReview class, shown below, is used to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 64

Multiple choice Arraylists
Assume list is an ArrayList<Integer> that has been correctly constructed and populated with the following items. [13, 7, 0, 5, 12, 6, 10] Consider the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 65

Multiple choice Arraylists
Consider the following code segment. ArrayList<String> supernatural = new ArrayList<String>(); supernatural.add("Vampire"); supernatural.add("Werewolf");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 66

Multiple choice Arraylists
Consider the following class declaration. public class City { private String name; private int population; public City(String myName, int myPop) { name =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 67

Free response Arraylists
Coin Collector The High School Coin Collection Club needs new software to help organize its coin collections. Each coin in the collection is represented by an…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 68

Multiple choice Arraylists
Consider the following class used by a company to represent the items it has available for online purchase. public class OnlinePurchaseItem { public double…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 69

Multiple choice Arraylists
Consider the following code segment. String crazyString = "crazy"; ArrayList<String> crazyList = new ArrayList<String>(); crazyList.add("weird");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 70

Multiple choice Arraylists
Consider the following code segment. ArrayList<String> nations = new ArrayList<String>(); nations.add("Argentina"); nations.add("Canada");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 61 of 225
Page 7 of 23