Question: in c write a class the requirements for the class...
In C++ write a class. The requirements for the class are define as followings:
Using the student class below create a StudentHash class
using namespace std;
cout<<"Enter first name=";
cout<<"Enter last name=";
cout<<"Do you have Middle name(0 for no, 1 for yes)";
cout<<"Enter Middle name=";
- Class StudentHash – This class will
have the following methods with their signatures as listed below:
- The constructor has one parameter. This parameter will be the maximum number of Student records that can be store in the hash table.
- It will create and initialize the hash table.
- This method will receive a Student record. It will try to insert the given Student record in the hash table that belongs to this class.
- If the Student record is inserted successfully, it will return the collision index (C) as described in the insertion steps.
- If the Student record cannot be inserted in the hash table, it will return (C * -1).
- This method will receive the Student ID used to look up for a Student record previously inserted into the hash table.
- If found, it will return the Student record.
- Otherwise, it will return null.
- This method has no input parameters.
- It will display the Student record data that have been inserted in the hash table.
- No return value from this function is needed.
- StudentHash (Constructor)