Lab 9 List Map (MAP ADT)
List Map代写 The questions in this worksheet all relate to the list based map data structure.Complete the methods in the ListMap class…
The questions in this worksheet all relate to the list based map data structure.
Complete the methods in the ListMap class on notes based on DLList.
For this assignment each entry will have an integer KEY a nd a string VALUE. FOR EXAMPLE: (1, China), (2, USA) , (3, Iran), (4, Ireland).
Question 1 List Map代写
Complete the implementation of the find method. Remember that this method should return the Position where the data was found.
Question 2
Complete the implementation of the get method.
Remember that this method should return the value that is associated with the key or null if it is not present
Question 3 List Map代写
Complete the implementation of the remove method. This should remove the position from the list where the key matches the parameter.
The value that was linked with this key should be returned.
If there is no matching key then null should be returned.
Question 4
Complete the implementation of the put method. This should add the new key and value to the map. If there is an entry in the list with the same key this should be removed and the value inside it returned. If there is no entry in the list with the same key then null should be returned.
Question 5 List Map代写
For this assignment each entry will have an integer KEY and a string VALUE. FOREXAMPLE: (1, China), (2, USA) , (3, Iran), (4, Ireland).
To test all the methods of your List MAP ADT create a main method that:
- Creates a List Map with the entries in the example above.
- Put entry: (1, Malaysia) , Put entry (65, Thailand)
- Remove (3, USA),
- Remove (4, Ireland)
- Get the entry with key 2
The result of this should be printed to the console. List Map代写
Submission:
One Zip file including all Java Files related to this assignment.