Executives within a company are ordered


Can be menu driven instead of command lines.
Must be read from a data file
No joption or text box just simple printing
5 companies instead of 20
please use simple and not advanced programming skills.
Data files:
Microsoft:
5 Sidney
4 Tim
3 Dale
2 Phillip
1 Clinton
Yahoo:
5 Mary
4 Bob
3 Roger
2 Steve
1 Niles
Linux:
5 Robert
4 Oliver
3 Alice
2 Owen
1 Tammy
IBM:
5 Joe
4 Sally
3 Bill
2 Tina
1 Rickey
Google:
5 Gill
4 Erica
3 Wallice
2 James
1 Brenson
Executives 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 * $1000.
Unemployed people draw $50 in unemployment compensation.
Input
l. From file "company": The company names are listed one per line. There are at most 20 companies. Company names are at most l0 characters and do not contain embedded blanks.
2. From the keyboard: Commands, as listed below. and  names are at most l0 characters and do not contain embedded blanks.
Command Processing
JOIN joins the specified . This may be
the first reference to this person, or he or she may be
unemployed. 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.
CHANGE quits his or her job and joins the specified
new . 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. I f
the person has lowest rank within the company, no
change occurs.
PAYDAY Each person is paid his or her salary as specified here.
(You must keep track of the amount each person has
earned from the start of the program.)
EMPLOYEES The current list of employees should be printed for the
specified . The employees must be printed
in order of rank; either top to bottom or bottom to top is
appropriate.
UNEMPLOYED The list of unemployed people should be printed.
DUMP Print the employees in each company, as specified
under the EMPLOYEES command above, then print the
unemployed people. Label the output appropriately.
END Stop accepting commands.
Note that the CHANGE, PROMOTE, and DEMOTE commands do not tell you the person's
current employer; you have to search the data structure to find the person.
Some sample data are in files "company" and "script" (for keyboard).Output (to screen and file "employ.out")
l. Echo print all commands, and print out a message that indicates what action has been
taken. (For the EMPLOYEES and UNEMPLOYED commands, print out the information
specified in the Input section.)
2. After all the commands have been processed, print out one list consisting of all the
people who have been mentioned in any command and the total amount of money they have
accumulated.
Data Structures
The list of employees for each company should be implemented using the appropriate List
ADT from this chapter.
Deliverables
• Program design and CRC cards for all classes
• A listing of your program including any classes used
• A listing of your test plan as input to the program
• A listing of the output file from the test runs
• A listing of employ.out
(This programming assignment was developed from an idea by Jim Bitner.)  

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Executives within a company are ordered
Reference No:- TGS080391

Expected delivery within 24 Hours