A method int size() in a linked list class returns the number of elements stored in the list by executing the single statement return count; For this to work correctly,
A) count must be a static variable in the class, initialized to 0, incremented by each add method, and decremented by each remove method
B) count must be an instance variable in the class, initialized to 0, incremented by each add method, and decremented by each remove method
C) count must be a local variable in each add and remove method: the add methods must increment count, and the remove methods must decrement count.
D) It is not possible for size to just return the count value: the size method must set count to 0 and then increment count once for each element in the list.
B) count must be an instance variable in the class, initialized to 0, incremented by each add method, and decremented by each remove method
You might also like to view...
Defining a narrow range for information output in an exception report is an example of bias through:
A) graphics. B) setting limits. C) sorting. D) None of the above.
When you export a table to an XML file, each record is converted into a data element, and XML tags for the field names within each record are created
Indicate whether the statement is true or false
Embedded style sheets are placed within Web pages using the ____ tag.
A. link B. anchor C. style D. font
FILE fp; correctly declares a file stream.
Answer the following statement true (T) or false (F)