Exam 3: Testing and Debugging

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

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:
Verified

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:
Verified

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:
Verified

adapter

A(n) ____________________ is a data structure with the property that only the top element is accessible.

(Short Answer)
4.9/5
(30)

There is only one stack interface in Java.

(True/False)
4.8/5
(40)

The storage policy used by a stack is ____.

(Multiple Choice)
4.8/5
(37)

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)

Rewrite the following as an infix expression: 5 6 * 10 -

(Short Answer)
5.0/5
(37)

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)

Which of the following is a balanced expression?

(Multiple Choice)
4.8/5
(44)

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)

Rewrite the following in infix form: x1 2.5 count * 3 / +

(Multiple Choice)
5.0/5
(38)
Showing 1 - 20 of 25
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)