You can use the code from the book page 293
Create a project SP15LAB6_PART1_LastName and add a class name
Declare a Hashtable data structure object named as myHashtable that stores nodes of the Employee where the employee id defined as a String is the key of myHashtable.
Read input from a file named as employeeList.txt that you manually create with several lines. Information of each line in the file employeeList.txt includes: last name, first name, employee Id, department, salary as following format. Also, ensure that the employeeList.txt has one employee having the employee id is 0097765 Bill - White 0012345 Marketing department 45000
Open file employeeList.txt, read each line:
After reading all file employeeList.txt, display the all the nodes from myHashtable to ensure all the information of employees are stored in the myHashtable
//Insert data to the Hashtable
Read the information of one employee who has the employee id is 0012345 from the myHashtable then display the information to the screen
Display the message to ask the employee id of Employee that is expected to change the department. Display the message to ask for the new department. Update the node in myHashtable with employee id as the id provided from the keyboard with the new department; then display the myHashtable to see the change
Remove the node of a Employee with employee id is 0097765 from the myHashtable, then display to see the rest of myHashtable to ensure the node is removed
When users choose to exit the program, open the file employeeList.txt to write and write all the information of employee stored in the myHashtable to the file.
Close file Write the comments for each operation