1Objective Manage Dictionaries use Set Map 2 points Use jav
(1)Objective: Manage Dictionaries use Set & Map (2 points)
Use java.util.TreeSet; to implement Dictionary data structure to perform
verification of an employee for the company. The employee.txt contains data
records of all employee. Use the name which is the first field on each record
as the key for the dictionary to access the database to perform this operation.
-------------------------------------------------------------------------------------------------------
//employee.txt
Sam,123 Main Line,555-0469,123-45-6789,2423.07
Carla,456 Off Line,555-0101,987-65-4321,1246.15
Woody,789 Off Rocker,555-0000,010-20-3040,1169.23
Diane,678 Fifth Ave,555-0690,958-47-3625,10.55
Norm,987 Suds Blvd.,555-8374,456-78-9000,11.2
Cliff,321 Duds Lane,555-7282,621-12-1234,12.0
Tom,2631 Main Blv,423-1155,524-332-6654,10.0
Kristen,443 Norfolk str,765-9457,010-332-1111,20.0
Solution
Please find the required program along with its output. Please see the comments against each line to understand the step.
-------------------------------------------------
OUTPUT:
Enter employee name to search:
tom
Employee{name=\'Tom\', address=\'2631 Main Blv\', mob=\'423-1155\', ofcPhone=\'524-332-6654\', salary=10.0}
