Question: A public put method which takes a key parameter ( string ) , then a list of fields parameter ( list of objects ) .

A public put method which takes a key parameter (string), then a list of fields parameter (list of objects).
1 If the degree of the given row doesnt match the degree field of the table, throw an illegal argument exception.
2 Create a new row composed of the key parameter and an unmodifiable view of the list of fields parameter.
3 Use your hash function and linear probing to find an old row with the given key.
4 On a miss, set the new row at the probed index, increase the size by 1, update the fingerprint, then return null.
5 On a hit, replace the old row at the probed index with the new row, update the fingerprint, then return the old list of fields.
6 On an unexpected fall-through when linear probing because the array is full, throw an illegal state exception.

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!