Implementing Key-Value-Store
Hey guys! I have to implement the basic functionalities of a KeyValueStore class. Itâs supposed to store Key-Value-Pairs as objects of the KeyValuePair class (It contains keys and values as String objects). The objects are stored in an array, the size of which is to be transferred to the constructor of the Key-Value-Store. The Key Value Store should provide four methods for accessing the key value pairs: - newKVP(String key, String value) - getKVP(String key) - updateKVP(String key, String newValue) - deleteKVP(String key) In addition, these methods have to throw an IllegalArgumentException to invalid parameters, such as: - zero was passed for one of the parameters - KVP with given key already exists at newKVP - there is no KVP for the given key with get, update, delete Now I know itâs a lot but Iâm fairly new to programming and these tasks that Iâm given are really lowering my motivation due to my incapability of fulfilling them. Iâm not asking for a finished code, all Iâm asking for is a basic guideline. How would you explain this task to, for example, a young child?