Write a menu-driven program that uses an array of queues to keep track of a group of executives as they are transferred from one department to another, get paid, or become unemployed. Executives within a department are paid based on their seniority, with the person who has been in the department the longest receiving the most money. Each person in the department receives $1000 in salary for each person in her department having less seniority than she has. Persons who are unemployed receive no compensation.
Your program should be able to process the following set of commands:
Join <person> <department> --> <person> is added to <department>
Quit <person> --> <person> is removed from his or her department
Change <person> <department> --> <person> is moved from old department to <department>
Payroll --> Each executive's salary is computed and displayed by the department in decreasing order of seniority
1
Expert's answer
2020-03-02T04:43:07-0500
Dear ChampUp, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Comments
Leave a comment