Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started