Java Net-Beans
A company requires a system to manage information on objects as outlined below. The system must have the ability to quicklyadd,retrieve,updateanddeleteinformation on the objects. The information on the object type is shown below.
Car
|
+ make : string
+ model: string
+ vin: string
+ mileage: int
|
|
You must design the core collection class using a hash table to store the object information.
You must use Double hashing as the collision resolution technique. The second hash funtion must have an increment less than or equal to one half (1/2) of the maximum table size.
The system should be able to hold a maximum of 700 actual objects and the load factor is around 70%
Write a function called “add” that takes the information required to create an object of the specified type and inserts it into the tableif it does not exist already.
The function must return atrue or false value to indicate if the operation was successful or not.
Write a function called “add” that takes the information required to create an object of the specified type and inserts it into the tableif it does not exist already.
The function must return atrue or false value to indicate if the operation was successful or not.
Write a function called “delete” that takes the information required to search for an object anddeletes the object from the hash table if it exists.
The function must return aboolean value to indicate if the operation was successful or not.
Write a function called “retrieve” that takes the information required to search for an object andreturns the object if found and null otherwise.
Write a function called “update” that takes the information required to search for an object anda new value for the last state in the object (the last field in the object).
The function must search for the object. If it is found, the last state value (the last field must be updated) must be updated.