Description
The java.util.BitSet is an class that is part of Java’s standard library that enables its users to work with
bitvalues. The class has numerous methods, but, for this assignment, please only consider only the following
four:
public BitSet(int nbits)
//Creates a bit set whose initial size is large enough to explicitly
//represent bits with indices in the range 0 through nbits-1. All bits are initially false.
//Parameters: nbits – the initial size of the bit set
//Throws: NegativeArraySizeException – if the specified initial size is negative
public void set(int bitIndex)
//Sets the bit at the specified index to true.
//Parameters: bitIndex – a bit index
//Throws: IndexOutOfBoundsException – if the specified index is negative
public boolean get(int bitIndex)
//Returns the value of the bit with the specified index. The value
//is true if the bit with the index bitIndex is
//currently set in this BitSet; otherwise, the result is false.
//Parameters: bitIndex – the bit index
//Returns: the value of the bit with the specified index
//Throws: IndexOutOfBoundsException – if the specified index is negative
public void flip(int bitIndex)
//Sets the bit at the specified index to the complement of its current value.
//Parameters: bitIndex – the index of the bit to flip
//Throws: IndexOutOfBoundsException – if the specified index is negative
Complete the following tasks for testing the capabilities of the four methods of the BitSet class using input
space partitioning. Assume that Java11 is being used.
1. Devise a set of characteristics based on the functionality described in the four methods of the BitSet
class. Aim for at least one interface-based and one functionality-based characterstic. Document the
characteristics and their corresponding blocks in a table. Make sure that each of the blocks is disjoint
and that they together cover the entire input domain.
2. Devise a set of test requirements based on the characteristics (blocks) from above, using Base Choice
Coverage, documenting the base case and any unfeasible combinations. Again clearly specify all of the
requirements in a table.
3. Implement a set of tests that cover all of the feasible test requirements. Add a comment to the top of
each test that indicates the test requirement(s) that are covered.
Why Choose Us
- 100% non-plagiarized Papers
- 24/7 /365 Service Available
- Affordable Prices
- Any Paper, Urgency, and Subject
- Will complete your papers in 6 hours
- On-time Delivery
- Money-back and Privacy guarantees
- Unlimited Amendments upon request
- Satisfaction guarantee
How it Works
- Click on the “Place Your Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
- Fill in your paper’s requirements in the "PAPER DETAILS" section.
- Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
- Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
- From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.