EXAM 3 CSIT 211 QUESTIONS AND ANSWERS
100% VERIFIED
The find method, as used in the array-based implementation of the remove and
contains operations, returns
a. the element that was found
b. the index of the element that was found
c. a true or false value indicating whether the element was found
d. the element whose reference variable points to the element that was found
e. none of the above - ANSWER b. the index of the element that was found
The Serializable interface allows
a. Exceptions to be thrown from methods.
b. objects to be read from and written to external files.
c. Object class elements to be added to list collections.
d. compiler warning messages to be suppressed.
e. none of the above - ANSWER b. objects to be read from and written to external
files.
When adding elements to an ordered list, the elements are ordered according to
a. the order of the calls to the add operation to add them to the list.
b. increasing size of storage to hold the element
c. the key value of each element
d. the address of the location in memory that holds the element.
e. none of the above is used to determine the order of the elements in an ordered
list. - ANSWER c. the key value of each element
, A(n) _____________________ is a list collection has elements that are ordered by
a characteristic of the elements.
a. ordered list
b. unordered list
c. indexed list
d. linked list
e. array - ANSWER a. ordered list
The LinkedList class is an example of a class that implements the List interface.
True
False - ANSWER True
Which operation below is not part of the List interface?
a. grow the size of the list
b. replace an element in the list with another element
c. get the size of the list
d. remove an element from the list
e. add an element to the list - ANSWER a. grow the size of the list
As with queues and stacks, the first step in removing an element from a list
collection is to
a. determine that the collection is not empty.
b. determine if the element is in the collection.
c. determine if the element is in the first or the last position in the collection.
d. determine if the collection will be empty once the element is removed.
e. none of these is a reasonable first step in removing an element from a collection.
100% VERIFIED
The find method, as used in the array-based implementation of the remove and
contains operations, returns
a. the element that was found
b. the index of the element that was found
c. a true or false value indicating whether the element was found
d. the element whose reference variable points to the element that was found
e. none of the above - ANSWER b. the index of the element that was found
The Serializable interface allows
a. Exceptions to be thrown from methods.
b. objects to be read from and written to external files.
c. Object class elements to be added to list collections.
d. compiler warning messages to be suppressed.
e. none of the above - ANSWER b. objects to be read from and written to external
files.
When adding elements to an ordered list, the elements are ordered according to
a. the order of the calls to the add operation to add them to the list.
b. increasing size of storage to hold the element
c. the key value of each element
d. the address of the location in memory that holds the element.
e. none of the above is used to determine the order of the elements in an ordered
list. - ANSWER c. the key value of each element
, A(n) _____________________ is a list collection has elements that are ordered by
a characteristic of the elements.
a. ordered list
b. unordered list
c. indexed list
d. linked list
e. array - ANSWER a. ordered list
The LinkedList class is an example of a class that implements the List interface.
True
False - ANSWER True
Which operation below is not part of the List interface?
a. grow the size of the list
b. replace an element in the list with another element
c. get the size of the list
d. remove an element from the list
e. add an element to the list - ANSWER a. grow the size of the list
As with queues and stacks, the first step in removing an element from a list
collection is to
a. determine that the collection is not empty.
b. determine if the element is in the collection.
c. determine if the element is in the first or the last position in the collection.
d. determine if the collection will be empty once the element is removed.
e. none of these is a reasonable first step in removing an element from a collection.