Question: Description In this lab you will create a backend class called SortableSet. A set, in computer science, is an unordered collection of unique objects. In

 Description In this lab you will create a backend class called

Description In this lab you will create a backend class called SortableSet. A set, in computer science, is an unordered collection of unique objects. In our Sortableset, all of the objects in the set will also be immutable at the set level. This means that even if the data class used to create objects is not immutable, once they are in the set they are. We do this by making a deep copy of any objects being added to the set or returned from the set. The objects stored in the Sortableset must implement an interface called Sortable that provides a numeric sorting key and a deep copy method. SortableSet also takes advantage of two custom exception classes: DuplicateException and InvalidKeyException. Finally, the "sortable" part of Sortableset is implemented by a getsortedlist method that makes a deep copy of every object in the set, saves them to an array, and then sorts them based on each object's sorting key. The sort algorithm used is a recursive radix sort modified to work with objects. Details The overall architecture of this lab is as shown here: All classes must be named as shown in the above UML diagram except the concrete ciass. JUnit tests need to be written for the SortedSet class. Be sure to test all possible outcomes of all the methods

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!