Question: Q 6 . ( 4 0 points ) You have been assigned to design test cases for black box testing of the two argument add

Q6.(40 points) You have been assigned to design test cases for black box testing of the two
argument add method in java.util.Vector. Here is part of its documentation:
public void add(int index, E element)
/* Inserts the specified element at the specified position in this Vector. Shifts the
element currently at that position (if any) and any subsequent elements to the right (adds
one to their indices).
*/
a.(10 points) What is the input domain of the add method from which you can select
its inputs?
The input domain of the add method is the enclosing vector class itself, the valid
integer values, and the element type to be inserted.
b.(10 points) What can be a basis for dividing the input domain of the above given
add method into equivalence partitions?
6
One example: value of index (integer). The input domain can be partitioned based
on the varying index values.
c.(10 points) Using the basis defined in (b), specify 3 or 4 equivalence partitions.
Invoke the given method with the following index values:
Negative,
0,
1,
length of the Vector object,
greater than length of the Vector object.
d.(10 points) For each subdomain from (c), give a test case input and the expected
output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!