Question: Java: Implement the MAP ADT based on the UML provided, and Create the interface, Abstract class, and the Concrete class HashMap listed below in the
Java:
Implement the MAP ADT based on the UML provided, and Create the interface, Abstract class, and the Concrete class HashMap listed below in the UML. Rename the interface, and the classes to MyMap, MyAbstractMap, and MyHashMap respectively.
Please do just the following methods for now:
Clear, ContainsKey, ContainceValue, get, put, remove, and size.
interface java.util.Map +clearO: void +containsKey(key: Object): boolean Removes all entries from this map. Returns true if this map contains an entry for the specified key Returns true if this map maps one or more keys to the +containsValue(value: Object): boolean +entrySetO: Set> +get(key: Object): V +isEmptyO: boolearn +keySetO: Set +put(key: K, value: V V +putA11 (m: Map extends K,? extends specified value. Returns a set consisting of the entries in this map. Returns the value for the specified key in this map. Returns true if this map contains no entries. Returns a set consisting of the keys in this map. Puts an entry into this map. Adds all the entries from m to this map. V>): void +remove(key: Object): V +sizeO: int +valuesO: Co1lection java.uti1.AbstractMap java.util.HashMap +HashMap +HashMap (initialCapacity: int, loadFactor: float) +HashMap(m: Map? extends K, ? extends V>) interface java.util.Map +clearO: void +containsKey(key: Object): boolean Removes all entries from this map. Returns true if this map contains an entry for the specified key Returns true if this map maps one or more keys to the +containsValue(value: Object): boolean +entrySetO: Set> +get(key: Object): V +isEmptyO: boolearn +keySetO: Set +put(key: K, value: V V +putA11 (m: Map extends K,? extends specified value. Returns a set consisting of the entries in this map. Returns the value for the specified key in this map. Returns true if this map contains no entries. Returns a set consisting of the keys in this map. Puts an entry into this map. Adds all the entries from m to this map. V>): void +remove(key: Object): V +sizeO: int +valuesO: Co1lection java.uti1.AbstractMap java.util.HashMap +HashMap +HashMap (initialCapacity: int, loadFactor: float) +HashMap(m: Map? extends K, ? extends V>)