Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Set.contains method returns true if and only if the element exists in the Set. a) The BSTSetTest.java file has test cases for BSTSet. Devise

image text in transcribedimage text in transcribed

image text in transcribed

image text in transcribed

The Set.contains method returns true if and only if the element exists in the Set. a) The BSTSetTest.java file has test cases for BSTSet. Devise three different tests for the contain:s method (put them in testContainsA,B, and C) so that you are confident that contains) works. Your tests for this part should be "black box", that is, they don't depend on the implementation: they only call public methods of BSTSet (in this case, the constructor, add(), and contains()). Your 3 tests need to be different: that is, your add methods should be such that they cause different underlying tree structures and there should be cases where contains() returns each true and false. Implement the BSTSet.contains method. b) The Set.contains method returns true if and only if the element exists in the Set. a) The BSTSetTest.java file has test cases for BSTSet. Devise three different tests for the contain:s method (put them in testContainsA,B, and C) so that you are confident that contains) works. Your tests for this part should be "black box", that is, they don't depend on the implementation: they only call public methods of BSTSet (in this case, the constructor, add(), and contains()). Your 3 tests need to be different: that is, your add methods should be such that they cause different underlying tree structures and there should be cases where contains() returns each true and false. Implement the BSTSet.contains method. b)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

3. How frequently do the assessments occur?

Answered: 1 week ago