Ask Computer Engineering Expert

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.)  

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M980391

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As