Implemented the 3 methods

Replacing they key with new value if it already exists.
Handle if key is not present.
Resize the array if it exceeds threshold.
Write test cases.