Highlights
In this project, your team will implement the MultiAcessKeyList ADT. This ADT can be used to create a list of key-value records that can be accessed using the record position in the list or the record’s key where key hashing should be used.
The following is a list of methods in the MultiAcessKeyList ADT:
+add(position:integer, key:K, value:V): void
This method adds the record key - value at position position . Position 1 indicates the first entry in the list. The method throws an exception ( IndexOutOfBoundsException ) if the position is invalid for this list.
+add(key:K, value:V): void
This methods adds the record key - value to the end of the list.
+remove(position:integer):V
This method removes and returns the value of the record at position position . The method throws an exception ( IndexOutOfBoundsException ) if the position is invalid for this list.
+remove(key:K):V
This method removes and returns the value of the record whose key is key . If no such record exists, this method returns null.
+clear():void
This method empties the list.
+contains(value:V):boolean
This method returns true if a record whose value is value exists and false otherwise.
+contains(key:K):boolean
This method returns true if a record whose key is key exists and false otherwise.
We will assume that key and value are not null. Also, keys are assumed to be unique.
To test your ADT, use the sample file on Moodle. It contains a list of 1000 name-address records. Use the person name as key and the address as the value.
This Engineering has been solved by our PHD Experts at My Uni Paper.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.