Question: The Sorted List ADT Implement the SortedList class. The SortedList class extends the List class. Both can be seen here. Your assignment is to implement

The Sorted List ADT

Implement the SortedList class. The SortedList class extends the List class. Both can be seen here. Your assignment is to implement (recursively) all of the abstract methods of the List class. They are:

insert (recursive)

iterator

remove (recursive)

retrieve (recursive)

search (recursive)

You must also implement an Iterator inner class for the SortedList class. You must submit a modified SortedList.java file with your source code. Do not submit and do not modify the List.java file.

Here is the given code:The Sorted List ADT Implement the SortedList class. The SortedList class extends

*Need the answer exaclty as is, so it can be copy and pasted into the file to submit. Previously submitted, somone answered and while runnng there was an error.

List.java public abstract class List implements Iterable protected class NodT protected Node (T data) ( this.datadata; protected T data; protected Node next; public abstract void insert E data) public abstract void remove(E data) public abstract E retrieve(int index) public abstract boolean search(E data); protected NodeE> head; SortedList.javia public class SortedListcE extends Comparable super extends List

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!