7. Given bList: bob, slob, snob, cob, hob, rob and the operation bList.remove(4) is
executed. What does the list become?
a) bob, slob, snob, hob, rob
b) bob, slob, snob, cob, rob
c) bob, slob
d) hob, rob
8. Given cList: bip, snip, pip, rip, dip, clip. What value would be returned by the call to
method cList.getEntry(3)?
a) bip
b) snip
c) pip
d) rip
9. Given cList: bip, snip, pip, rip, dip, clip. What value would be returned by the call to
method cList.insert(9, sip)?
a) true
b) false
c) it throws an exception
d) sip
10. What should be returned by the list operation (aList.insert(2,x)).getEntry(2) ?
a) false
b) 2
c) x
d) an exception is thrown
11. What would be returned by the list operation (bList.insert(3,x)).remove(3)?
a) 2
b) x
c) false
d) bList
12. Consider nameList of size 12. For the operation nameList.insert(Clyde,x), which of the
following would be an invalid value for x?
a) 0
b) 1
c) 3
d) 12
13. Given the commands below, what do they do?
n = 0
for (position = 1 through intList.getLength())
n+= intList.getEntry(position)
a) insert integers into the list
b) sum the values found in list
c) sum the numbers 0 through n
d) calculate n!