Question: Programming Language : Java Create your own hashmap interface with the following method: put(key, value) this method insert key/value pairs into the table. toString() this

Programming Language : Java

  1. Create your own hashmap interface with the following method:
    1. put(key, value) this method insert key/value pairs into the table.
    2. toString() this method printing the entire HashMap object.
    3. size() this method is used to return the size of the HashMap object.
    4. keySet() this method returns a Set object containing all the keys.
    5. keyValue() - this method returns a Collection object containing all the values.
    6. get(key) this method returns the value for a given key.
    7. remove(key) this method deletes the pair.
    8. clear() this method remove all items.
    9. containsKey(key) this method returns true if the key is retrieve otherwise return false.
    10. containsValue(value) this method returns true if the value is retrieve otherwise return false.

Write also a program to implement your interface. Test all our method, Print screen the output, write a comment and make it neat.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!

Q:

hh