Consider the following text file “input.txt” that contains in each line employee information separated by “#” following this format:
line_number#first_name#last_name#position#id_number
Write a C++ project that would display the following options to the user:
Choose one of these options:
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines
Order Paper Now1 – Search for an employee
2 – Sort the list of employees
3 – Insert a new employee
4 – Delete an employee
Once the user enters 1, 2, 3 or 4, it should show the following messages:
- If the user enter 1:
- Search by Last Name
- Search by First Name
- Search by Position
Once the user enters a, b or c, the program should display to the screen all the information of the employee in question
- If the user enter 2:
- Sort by Last Name
- Sort by First Name
- Sort by Position
Once the user enters a, b or c, the program should display to the screen list of employees sorted by the corresponding criterion
- If the user enter 3: the user should enter the details of the employee separated by “#”. These details have to be written to the file according to the line number. Your program should allow adding a line in the beginning, in the middle or at the end of the file content (lines that already exist).
- For example if you enter 1#……. this should write this line in the beginning and shift the previous content of the file one line below and adjust all lines’ numbers to be in incremental order
- For example if you enter 3#…….this should write this line in the middle of the previous content after line 2 and before line 3 of the previous content and adjust all lines’ numbersto be in incremental order
- For example if you enter 9#…….this should write this line in the end of the file
- If the user enter 4: the program will ask you for the index of the line that you want to delete and once provided it will delete from the file and adjust the line numbers to be in incremental order
Your program should have employee class to store employee information using getters and setters. For the search, sort, insertion and delete options you can have them as methods in the class containing the main method or you can have a class for each feature, i.e. a class for search that has all the corresponding methods, another one for sort, etc.
Deliverable: zipped file containing the Visual studio project folder