Question: The problem is to write a program that will read some data from the keyboard, build a 2 - dimensional list with that data, process
The problem is to write a program that will read some data from the keyboard, build a dimensional list with that data, process the data and report the results. The input data represents one shift at John Emerald's Steakhouse, the output results will help management make improvements to customer service and worker satisfaction.
Initialization and standard input:
Your program must process all the data given by the user; you do not know how much will be entered. The program should work for any amount of input data, not just the specific values in the examples.
The first two inputs provide management with some key business metrics regarding the number of tables served integer and the total receipts collected from those tables float
Worker input, wage list creation Sentinel Logic :
The inputs from the user from the keyboard contain a worker name with no spaces in it then a comma then two numbers separated by commas which represent the hours worked and the hourly wage of that worker The numbers will be floats. There may or may not be whitespace around the numbers.
The user stops inputting by pressing Enter alone.
Your program builds a dimensional list where each row represents one worker. Each row contains the worker wages hours worked hourly wage in the first column and the worker's name in the second column
One row of wage list worker wages, worker name
Sample of a D list: 'Becca' 'Adam'
Output of the results:
The wages received by each worker formatted to decimal places and the worker's name, reverse sorted by the wages received.
Estimates the food cost as of total receipts
Totals the wages of all workers for the Labor cost Total shift pay requires an accumulator in one of your loops
The Gross Profit Total receipts Food Cost Labor Cost
The Gross Profit per Table Served
John Emerald's Steakhouse shift analysis
Enter number of tables served this shift:
Enter total of all receipts for this shift:
Enter worker name, hours worked, hourly wage for each worker.
Enter a blank line to indicate end of workers being paid.
Worker: Emma,
Worker: Adam,
Worker: Becca,
Worker: Mark,
Worker: Rene,
Worker:
Workers paid for this shift
$ Emma
$ Mark
$ Adam
$ Becca
$ Rene
$ Total shift pay
John Emerald's Steakhouse gross profit for this shift
$ Total receipts
$ Food cost of total receipts
$ Labor cost Total shift pay
$ Gross profit
Gross profit per table: $
Sample Run : Closed due to flooding
John Emerald's Steakhouse shift analysis
Enter number of tables served this shift:
Enter total of all receipts for this shift:
Enter worker name, hours worked, hourly wage for each worker.
Enter a blank line to indicate end of workers being paid.
Worker:
Workers paid for this shift
$ Total shift pay
John Emerald's Steakhouse gross profit for this shift
$ Total receipts
$ Food cost of total receipts
$ Labor cost Total shift pay
Sample Run : All hands on deck
John Emerald's Steakhouse shift analysis
Enter number of tables served this shift:
Enter total of all receipts for this shift:
Enter worker name, hours worked, hourly wage for each worker.
Enter a blank line to indicate end of workers being paid.
Worker: Micah,
Worker: Emma,
Worker: Adam,
Worker: Becca,
Worker: Karl,
Worker: Mark,
Worker: Rene,
Worker: Max,
Worker:
Workers paid for this shift
$ Emma
$ Mark
$ Micah
$ Adam
$ Becca
$ Karl
$ Max
$ Rene
$ Total shift pay
John Emerald's Steakhouse gross profit for this shift
$ Total receipts
$ Food cost of total receipts
$ Labor cost Total shift pay
$ Gross profit
Gross profit per table: $
Sample Run : Slow night, send workers home
John Emerald's Steakhouse shift analysis
Enter number of tables served this shift:
Enter total of all receipts for this shift:
Enter worker name, hours worked, hourly wage for each worker.
Enter a blank line to indicate end of workers being paid.
Worker: Micah,
Worker: Emma,
Worker: Adam,
Worker: Becca,
Worker: Karl,
Worker: Mark,
Worker: Rene,
Worker: Max,
Worker:
Workers paid for this shift
$ Emma
$ Adam
$ Becca
$ Micah
$ Mark
$ Karl
$ Rene
$ Max
$ Total shift pay
John Emerald's Steakhouse gross profit for this shift
$ Total receipts
$ Food cost of total receipts
$ Labor cost Total shift pay
$ Gross profit
Gross profit per table: $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
