The actual Set interface in the java.util package has several methods that are beyond those implemented by

Question:

The actual Set interface in the java.util package has several methods that are beyond those implemented by our search tree in this chapter. Write a version of SearchTree that adds some or all of these methods. The methods to add are the following (some headers are slightly modified; see the Java API Specification for descriptions of each method):

  • public void addAll(SearchTree tree)
  • public void clear()
  • public boolean containsAll(SearchTree tree)
  • public boolean equals(Object o)
  • public boolean isEmpty()
  • public boolean remove(Object o)
  • public void removeAll(SearchTree tree)
  • public void retainAll(SearchTree tree)
  • public Object[] toArray()
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Building Java Programs A Back To Basics Approach

ISBN: 9780135471944

5th Edition

Authors: Stuart Reges, Marty Stepp

Question Posted: