Question: In Java!!!!! Dictionary.java: public interface Dictionary { public void clear(); public void insert(Key k, E e); public E remove(Key k); // Null if none public

 In Java!!!!! Dictionary.java: public interface Dictionary { public void clear(); public

In Java!!!!!

Dictionary.java:

public interface Dictionary {

public void clear();

public void insert(Key k, E e);

public E remove(Key k); // Null if none

public E removeAny(); // Null if none

public E find(Key k); // Null if none

public Iterable findAll(Key k);

public Iterable values();

public int size();

};

(3) The BSTDictionary class on moodle has a method range with the following declaration public Iterable range(K a, K b) Passed a low key value a and a high key value b, range should return an ArrayList that contains all the dictionary values with key between a and b, inclusive, in order. The range method relies on the rangehelp method which is not fully implemented. Complete the definition of rangehelp. Use the program PrintRange.java to test your method. It reads in the shuffled cmu pronunciation dictionary and creates a dictionary keyed on word. The program reads two strings from the terminal, and prints out all records witlh keys that fall between the two given strings, inclusive. Your range methood should visit as few nodes in the BST as possible. For example, with input DOFF DOG PrintRange should produce the output DOFF D A01 F DOFFING D A01 F IHO NG DOFFS D A01 F S DOG D A01G (3) The BSTDictionary class on moodle has a method range with the following declaration public Iterable range(K a, K b) Passed a low key value a and a high key value b, range should return an ArrayList that contains all the dictionary values with key between a and b, inclusive, in order. The range method relies on the rangehelp method which is not fully implemented. Complete the definition of rangehelp. Use the program PrintRange.java to test your method. It reads in the shuffled cmu pronunciation dictionary and creates a dictionary keyed on word. The program reads two strings from the terminal, and prints out all records witlh keys that fall between the two given strings, inclusive. Your range methood should visit as few nodes in the BST as possible. For example, with input DOFF DOG PrintRange should produce the output DOFF D A01 F DOFFING D A01 F IHO NG DOFFS D A01 F S DOG D A01G

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!