subject

This must be in C++ programming language. Write a program that tracks all the employees of a company. Employees are being promoted and demoted, and, of course, getting paid. The list of people the program must deal with is not fixed: initially there are none, and new people may be introduced by the JOIN command (see below). Employees within a company are ordered according to a seniority system and are numbered from 1 to N (the number of people in the company) to indicate their rank: 1 is the lowest rank and N is the highest. A new employee always enters at the bottom of the ladder and hence always starts with a rank of 1. When a new person joins a company, the rank of everyone in the company is increased by one, and when an employee quits, the rank of employees above him or her in that company is decreased by one. Promotions can also occur and affect the ranks in the obvious way. Naturally, salaries are based on rank. An employee's salary is Rank * $2000.

Command Processing

JOIN joins the company. This may be the first reference to this person. The person does not currently belong to another company.

Remember that when a person joins a company he or she always starts at the bottom.

QUIT quits his or her job and becomes unemployed. You may assume that the person is currently employed.

PROMOTE is moved up one step in the current company, ahead of his or her immediate superior.

If the person has highest rank within the company, no change occurs.

DEMOTE is moved one step down in the current company, below his or her immediate subordinate.

If the person has lowest rank within the company, no change occurs

SALARY Displays the list of employees and the salary paid to each employee. Each person is paid his or her salary as specified here.

(You must keep track of the amount each person in the company. Salary is based on current rank of the employee. Employee’s salary is Rank *$2000)

EMPLOYEES The current list of employees should be printed for the company.

The employees must be printed in order of rank; either top to bottom or bottom to top is appropriate.

END Stop accepting commands.

Can use arbitrary employee details.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:30
Quic which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the
Answers: 1
You know the right answer?
This must be in C++ programming language. Write a program that tracks all the employees of a compan...
Questions
question
Chemistry, 14.12.2019 01:31
question
English, 14.12.2019 01:31
question
Mathematics, 14.12.2019 01:31
Questions on the website: 13722360