Question: Hello, I need help with finding the solution to the following code posted above, both part 1 and part 2. Any help would be greatly

 Hello, I need help with finding the solution to the following

Hello,

I need help with finding the solution to the following code posted above, both part 1 and part 2. Any help would be greatly appreciated, thanks in advance.

Part 1 A dictionary is a data structure specialized for searching by some keys. This structure maps unique keys to their values, so a key uniquely maps to only one value. While keys and Values can be of different data types, assume that all the keys are of the same type and the same for the values. For example, a dictionary may associate student IDs to their numeric grades. In this example keys are very probably of type string and values are floating-point numbers Define a class template for the dictionary type based on the following instructions: Consider a maximum size for your dictionary and define two arrays of that size one for the keys and one for the values. Since your dictionary does not necessarily have elements equal to the maximum value you considered, you must consider another attribute to store the actual number of elements in the dictionary Complete your implementation by implementing the following methods 1. A default constructor that creates an empty dictionary A method to add an element (i.e. a pair of key-value) to the dictionary. This method throws an exception if the dictionary is full. In case the key already exists in the dictionary, this method updates the value to the new value A method to retrieve the value associated with a key. This method throws an exception in case the key does not exist. A method to check if a key exists in the dictionary A method to delete a pair of key-value from the dictionary. This method also throws an exception in case the provided key does not exist. A method to overload the subscript operator (i.e. []) to retrieve a value associated with a key provided inside square brackets. This method also throws an exception if the specified key does not exist. Overload the stream insertion operator (i.e.

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!