Question: Create a program with the following menu: 1 ) Author Info 2 ) Add Student 3 ) Add Faculty 4 ) Get Student Data 5
Create a program with the following menu:
Author Info
Add Student
Add Faculty
Get Student Data
Get Faculty Data
Remove Student
Remove Faculty
Exit
When the user selects print your name and ID
When the user selects Ask the user for a student name one word ID integer and Class Standing string store this data in your hash table
When the user selects ask the user for a name one word ID integer and course load integer
When the user selects ask the user to enter an integer then print the values for the student with the given ID from your hash table
When the user selects ask the user to enter a name, then print the values for the faculty member with that name.
When the user selects ask the user for an integer and remove the student with that id from the hash table, or print not found if there is no student with that id stored.
When the user selects ask the user for a name, then remove the faculty member with that name from your hash table, or print not found if that faculty member is not stored in the hash table.
When the user selects exit the program.
You may not use the built in HashMap class and instead must create your own hash table that uses an array for internal storage.
For data you must have a class called Student and Faculty which provide a toString method that prints all of the values stored in the object and must the following constructors:
Studentint id String name, String standing
Facultyint id String name, int courseLoad
Override the toString method to print the content of the internal storage array
use simple mod hash for the hashing function
for collisions use linear probing
Use a table size of for the initial table size
if you need to resize multiply size by
you do not need to worry about the user trying to enter the same key multiple times
The Hash table must be in a class called HashTable and must support the following methods:
add which takes a single parameter the object being added to the table
remove which takes a single int parameter, the key that is to be removed from the table
reminder: you can use the hashCode method of an object to fetch an integer value representing the hash value of the object.
For students the hash value is the id value of the student
For faculty the hash value is the sum of ascii values for the letters so name abc has a hash value of Abc would be
Your program should not crash
Grading:
points serious attempt to complete the assignment
points can add data to the correct indices verified via toString method of hash table
point program does not crash
points can remove items from hash table
point can fetch data from hash table
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
