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:
1) Author Info
2) Add Student
3) Add Faculty
4) Get Student Data
5) Get Faculty Data
6) Remove Student
7) Remove Faculty
0) Exit
When the user selects 1 print your name and ID
When the user selects 2 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 3 ask the user for a name (one word) ID (integer) and course load (integer)
When the user selects 4 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 5 ask the user to enter a name, then print the values for the faculty member with that name.
When the user selects 6 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 7 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 0, 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 Student265 and Faculty265 which provide a toString method that prints all of the values stored in the object and must the following constructors:
Student265(int id, String name, String standing)
Faculty265(int 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 10 for the initial table size
if you need to resize multiply size by 1.5
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 HashTable265 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 97+98+99=294, Abc would be 65+98+99=262)
Your program should not crash
Grading:
3 points serious attempt to complete the assignment
3 points can add data to the correct indices (verified via toString method of hash table)
1 point program does not crash
2 points can remove items from hash table
1 point can fetch data from hash table
Create a program with the following menu: 1 )

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 Programming Questions!