Image Fr om Medium.
Β
βSTOP!β Before you look at the answers make sure you gave this practice quiz a try so you can assess your understanding of the concepts covered in unit 7. Click here for the practice questions:
AP CSA Unit 7 Multiple Choice Questions.Facts about the test: The AP Computer Science A exam has 40 multiple choice questions and you will be given 90 minutes to complete the section. That means it should take you around 34 minutes to complete 15 questions.
*The following questions were not written by CollegeBoard and although they cover information outlined in the AP Computer Science A Course and Exam Description the formatting on the exam may be different.
A. 115
B. 109
C. 105
D. 90
Answer:Β Since 115 is smaller than 120 the first ELSE loop will execute. which will give correct result.
π
Study AP CSA, Unit 7.3: Traversing ArrayListΒ
A. An ArrayList can allocate more space than it needs.
B. You can store objects in an ArrayList, but not in an array.
C. An ArrayList can grow or shrink as needed, while an array is always the same size.
D. An ArrayList can grow or shrink as needed, while an array is always the same size.
Answer:Β Main benefit to using an ArrayList.... and every time an ArrayList fills up a new array is created that is twice as big. This can lead to extra space that is wasted.
πΒ
Study AP CSA, Unit 7.1:Β Introduction to ArrayListΒ
A. ["Destini", "Layla", "Sharrie", "Sarah"]
B. ["Sarah", "Layla", "Sharrie"]
C. ["Sarah", "Destini", "Layla", "Sharrie"]
D. ["Sarah", "Destini", "Anaya", "Layla", "Sharrie"]
Answer:Β The list is first ["Anaya", "Layla", "Sharrie"] and then ["Destini, "Layla", "Sharrie"] and finally ["Sarah", "Destini, "Layla", "Sharrie"]
πΒ
Study AP CSA, Unit 7.2:Β ArrayList Methods
A. [1, 2, 3, 4, 5]
B. [1, 2, 5, 4, 6]
C. [1, 2, 4, 5, 6]
D. [1, 5, 2, 4, 6]
Answer:Β "add" method that takes an object as a parameter & adds that object to the end of the list. "set" replaces the value at that index with the new value. "add" with index & object parameters puts the passed object at that index and moves any existing values one to the right (increments).
πΒ
Study AP CSA, Unit 7.2:Β ArrayList Methods
A. [0, 0, 0, 4, 2, 5, 3]
B. [4, 2, 5, 3]
C. [0, 0, 4, 2, 5, 0, 3]
D. [0, 4, 2, 5, 3]
Answer:Β This shows all zeros removed. Since k is only incremented if a value wasn't removed this will work correctly.
πΒ
Study AP CSA, Unit 7.3:Β Traversing ArrayListΒ
A. Both methods produce the same result and take the same amount of time.
B. The two methods produce different results and take the same amount of time.
C. The two methods produce different results, and process1 is faster than process2.
D. The two methods produce different results, and process2 is faster than process1.
Answer:Β Both process1 & process2 add to the end of the list each time through the loop. The only difference would be if there were values in the list in process2, existing values would be moved to the right. But, there are no existing values in the list at that index or beyond.
πΒ
Study AP CSA, Unit 7.3:Β Traversing ArrayListΒ
A. Method
B. Array
C. ArrayList
D. Object
Answer:Β definition of ArrayList
πΒ
Study AP CSA, Unit 7.1:Β Introduction to ArrayListΒ
A. set ArrayList<E>()
B. new ArrayList<E>()
C. new ArrayList {E}()
D. new ArrayList E;
πΒ
Study AP CSA, Unit 7.1:Β Introduction to ArrayListΒ
A. OverflowException
B. runtime error
C. Overflow error
D. ConcurrentModificationException
πΒ
Study AP CSA, Unit 7.1:Β Introduction to ArrayListΒ
A. personal privacy
B. personal data
C. security
D. digital footprint
Answer:Β
definition of digital footprint
πΒ
Study AP CSA, Unit 7.1:Β Introduction to ArrayListΒ
A. network protocols
B. network rules
C. device security
D. network footprints
Answer:Β
definition of network protocol
πΒ
Study AP CSA, Unit 7.1:Β Introduction to ArrayListΒ
A. binary search
B. sort protocol
C. linear search
D. parallel search
Answer:Β
definition of linear search
πΒ
Study AP CSA, Unit 7.1:Β Introduction to ArrayListΒ
A. MinChoice sort
B. selection sort
C. parallel sort
D. minimum sort
Answer:Β
definition of selection sort
πΒ
Study AP CSA, Unit 7.1:Β Introduction to ArrayListΒ
A. [!, ?, !, ?, ?]
B. [!, !, ?, !, ?, !]
C. [!, !, ?, !, ?]
D. [!, ?, !, ?, !]
Answer:Β
% means remainder when 2 integers are divided: for example 126 % 10 = 6 because 126/10 is 12 with a remainder of 6
A. int size()
B. int length()
C. Object get(int index)
D. boolean isEmpty()
Answer:Β knowledge relating to ArrayList
πΒ
Study AP CSA, Unit 7.2:Β ArrayList Methods
π¦ Jump to AP CSA Unit 8 Multiple Choice Questions
π€ Connect with other students studying AP CSA with
Hours