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