Exam 3: Testing and Debugging
Exam 1: Object-Oriented Programming and Class Hierarchies41 Questions
Exam 2: Lists and the Collections Framework35 Questions
Exam 3: Testing and Debugging25 Questions
Exam 4: Stacks and Queues28 Questions
Exam 5: Recursion25 Questions
Exam 6: Trees25 Questions
Exam 7: Sets and Maps27 Questions
Exam 8: Sorting25 Questions
Exam 9: Self-Balancing Search Trees28 Questions
Exam 10: Graphs25 Questions
Exam 11: Introduction to Java25 Questions
Exam 12: Overview of UML25 Questions
Select questions type
In the Java API, class java.util.Stack<E> implements a stack; there is no stack interface.
Free
(True/False)
4.9/5
(40)
Correct Answer:
True
The implementation of the Stack ADT as an extension of Vector is a good choice because all the Vector methods are accessible.
Free
(True/False)
4.7/5
(49)
Correct Answer:
False
The ListStack class is said to be a(n) ____________________ class because it adapts the methods available in another class (List) to the interface its clients expect by giving different names to essentially the same operations.
Free
(Short Answer)
4.8/5
(41)
Correct Answer:
adapter
A(n) ____________________ is a data structure with the property that only the top element is accessible.
(Short Answer)
4.9/5
(30)
The ____________________ class implements a growable array of objects. Like an ArrayList, it contains components that can be accessed using an integer index.
(Short Answer)
5.0/5
(32)
An alternative to implementing a stack as an extension of Vector is to write a class that has a(n) ____ component.
(Multiple Choice)
4.8/5
(30)
The method ____ returns the position of the character argument in the string.
(Multiple Choice)
4.8/5
(39)
The Java API includes a Stack class as part of the package java.util. This class is declared as follows:
(Multiple Choice)
4.9/5
(43)
The array data field can be used for storage of a stack instead of using Java's ArrayList class.
(True/False)
5.0/5
(36)
A(n) ____________________ is a data structure in which objects are inserted into and removed from the same end.
(Short Answer)
4.8/5
(39)
In terms of efficiency, all stack operations using an array structure are ____________________.
(Short Answer)
4.8/5
(38)
A(n) ____________________ is a string that reads the same in either dierection: left to right or right to left.
(Short Answer)
4.9/5
(42)
In a(n) ____________________, the top element is the data value that was most recently stored.
(Short Answer)
4.8/5
(35)
The value of the following postfix expression is ___________________.
1 2 + 4 * 3 +
(Short Answer)
4.8/5
(44)
The easiest approach to implementing a stack in Java would be to give it a(n) ____ component for storing the data.
(Multiple Choice)
4.8/5
(37)
Showing 1 - 20 of 25
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)