Question: just in java Implement an ADT array based dictionary, where each entry in the array will be a node that has it s search key,
just in java Implement an ADT array based dictionary, where each entry in the array will be a node that has its search key, and
the nodes value in it
Methods that the dictionary should have:
Add value key adds the given value into the dictionary with the given key
removekey removes the given key and its value from the dictionary
containskey returns the value if the given key is in the dictionary, a negative value if not
sort sorts the dictionary by key
The type for the key being used must implement comparable, so that the dictionary can be sorted
Write a test class where you use your dictionary by adding some names into it as the search keys, and a double
value that represents that name's account balance.
Show that adding, removing, and searching your dictionary works in this test class What other ways can an array based dictionary be implemented? What if you didn't want to use an array, how else might you be able to implement a dictionary?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
