Write a program that reads information about employees of a company from a file.  The information in the file is ordered based on the salary.  An employee with the highest salary, for example, should appear at the top.  Your program should first read the contents of the input file, create a linked list to store the contents, and then display the original list. Then, it will delete the employee with ID 444444444 from the list and will display the list again.  The last step your program perform is to insert three new employees into the list and display the final results.  Here is the information on the three new employees Given: Last Name               First Name               ID             Phone          Salary =========== ========== ========   =======      ===== Wood                       Carpenter        333556666  222-222-2222    40000 Ironman                    Iron                 444444443  828-888-8888    73000 Goal-keeper             Martin              777777777  888-666-8888   86000 Here is the input file. Doe            John            555555555       333-333-3333         65000 Doe             Jan             444444444       333-333-3333          75000 Hardworker John          888888888       888-888-8888          55000 Programmer Travis       555446666        666-666-6666         76000 Output: Original List Last Name                First Name              ID            Phone          Salary =========== ==========  ========    =======    ===== Doe                            John                555555555    333-333-3333 85000 Doe                             Jan                 444444444    333-333-3333 76000 Hardworker               John                888888888     888-888-8888 75000 Programmer              Travis               555446666    666-666-6666 45000 List after removal of employee 444444444: Last Name                 First Name           ID              Phone            Salary =========== ========== ========   =======     ===== Doe                         John             555555555        333-333-3333    85000 Hardworker             John             888888888        888-888-8888   75000 Ironman                   Iron             444444443        828-888-8888    73000 Programmer            Travis           555446666        666-666-6666    45000 Final Output: Last Name                First Name         ID                 Phone            Salary =========== ========== ========   =======      ===== Goal-keeper                 Martin         777777777      888-666-8888    86000 Doe                                John          555555555      333-333-3333    85000 Hardworker                 John             888888888      888-888-8888    75000 Ironman                       Iron             444444443      828-888-8888     73000 Programmer               Travis            555446666      666-666-6666    45000 Wood                       Carpenter         333556666     222-222-2222     40000

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write a program that reads information about employees of a company from a file.  The information in the file is ordered based on the salary.  An employee with the highest salary, for example, should appear at the top.  Your program should first read the contents of the input file, create a linked list to store the contents, and then display the original list. Then, it will delete the employee with ID 444444444 from the list and will display the list again.  The last step your program perform is to insert three new employees into the list and display the final results.  Here is the information on the three new employees

Given:

Last Name               First Name               ID             Phone          Salary
=========== ========== ========   =======      =====
Wood                       Carpenter        333556666  222-222-2222    40000
Ironman                    Iron                 444444443  828-888-8888    73000
Goal-keeper             Martin              777777777  888-666-8888   86000


Here is the input file.
Doe            John            555555555       333-333-3333         65000
Doe             Jan             444444444       333-333-3333          75000
Hardworker John          888888888       888-888-8888          55000
Programmer Travis       555446666        666-666-6666         76000

Output:
Original List
Last Name                First Name              ID            Phone          Salary
=========== ==========  ========    =======    =====
Doe                            John                555555555    333-333-3333 85000
Doe                             Jan                 444444444    333-333-3333 76000
Hardworker               John                888888888     888-888-8888 75000
Programmer              Travis               555446666    666-666-6666 45000


List after removal of employee 444444444:
Last Name                 First Name           ID              Phone            Salary
=========== ========== ========   =======     =====
Doe                         John             555555555        333-333-3333    85000
Hardworker             John             888888888        888-888-8888   75000
Ironman                   Iron             444444443        828-888-8888    73000
Programmer            Travis           555446666        666-666-6666    45000
Final Output:
Last Name                First Name         ID                 Phone            Salary
=========== ========== ========   =======      =====
Goal-keeper                 Martin         777777777      888-666-8888    86000
Doe                                John          555555555      333-333-3333    85000
Hardworker                 John             888888888      888-888-8888    75000
Ironman                       Iron             444444443      828-888-8888     73000
Programmer               Travis            555446666      666-666-6666    45000
Wood                       Carpenter         333556666     222-222-2222     40000

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Operations of Linked List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY