The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 305 Weeks Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
I need help to do this assignment but i am confused.
Â
so can you help me to find a way to do this home work ?
Â
Â
Payroll
Assignment Specifications
Overview
You are the owner of a medium-sized growing company consisting of more than 100 employees. The company has several departments, each of which might have up to 50 employees (but possibly more). You are developing a Weekly Department Salary Report program. The user will interactively enter information for each employee, including their first name and last name, hourly wage, and number of hours worked. The program should create a report as this information is entered. The report will be stored in a disk file.
The report will include the information entered by the user, plus will show both the regular and overtime hourly wage, regular and overtime pay for the period, and a total pay for the period. The overtime rate is 1.5 times the regular rate, although the legislature is considering changing this within the next year or two. Overtime is currently paid for any time over 40 hours during the period; however, this might change too.
Â
User Interface Specifications
Here is a sample dialog. Your spacing and wording should be the same as it is here. Please note that the yes/no answer in response to "Process another employee?" is a single character, and can be Y, y, N or n. No validation is necessary in this program, so assume that the user types a valid response (one of the ones just mentioned).
Mountain Pacific Corporation
Department Salary Program
Â
Please enter the name of the department: Marketing
Â
Enter employee #1: Juan Arago
Enter the hourly wage of Juan Arago: 12.50
Enter total number of hours:Â 40
Â
Thank you. Process another employee? Y
Â
Enter employee #2: Winnie Chen
Enter the hourly wage of Winnie Chen: 11.45
Enter total number of hours:Â 45.5
Â
Thank you. Process another employee? y
Â
Enter employee #3: Jack Donovan
Enter the hourly wage of Jack Donovan: 16.80
Enter total number of hours: 60
Â
Thank you. Process another employee? Y
Â
Enter employee #4: Francine Jackson
Enter the hourly wage of Francine Jackson: 19.00
Enter total number of hours:Â 35
Â
Thank you. Process another employee? n
Â
End of processing.
Â
Â
Report File Specifications
Please follow these rules for full credit!
Your output should appear identical to that shown below (same horizontal spacing and everything). If lines are missing or values are off or spacing is different, your score will take a hit.
Assume that the department name is only one word, 20 characters long maximum, with no embedded spaces. Assume each name requested interactively is actually a first name and a last name, so TWO variables will be involved. Each of the two names is limited to a logical length of 10 characters, which means that the maximum logical length of the entire name will be 21 characters (which includes the space between the names). Be very careful of your string lengths! Remember the guidelines discussed in the lecture.
You'll have to do a little thinking to figure out how to get the printed names lined up with all the other columns. The first hint is that it involves joining strings together, something called concatenation. Give it a go, and if you can't figure it out, look at the next document in this folder; it contains additional hints. Part of the purpose of this assignment is to implicitly teach you concatenation. Do NOT use tabs (t) and make sure your C/C++ editor does not produce tab characters.
Do NOT use gets() in this program. Use scanf() for inputting the interactive information. If you try to use gets(), you may get VERY frustrated.
In essence, all numbers appearing in the report should be right-justified and decimal-aligned. All numbers appearing in the summary should appear without leading spaces (other than the one which normally separates the number from the previous word). Hourly wage amounts CAN be less than 10.00, so be very careful with your formatting. The sample output can appear correct, but you can still be docked a half-point if things don't align properly with hourly wages under $10.00.
Your calculated amounts in the report should NOT be off by one cent. Since we are all using Dev C++, you should end up with the exact same results as below.
Here is the report that would be developed from the sample input above. The output should be written to the file similar to your previous assignments (c:class folder and with the filename having your first initial and last name with a -pay at the end). For instance, if I were submitting the assignment as a student, my file would be c:classkjefferies-pay.txt on the hard disk. Again, I understand that Blackboard may change this to a _pay for submission.
Your output file should START with the Mountain Pacific line; there is no blank line before it.
Mountain Pacific Corporation
Department Salary Program
Â
Department: Marketing
Â
Employee                Reg Hrs        Overtime Hrs       Gross
-----------------------------------------------------------------
Juan Arago           40.0 ($12.50)    0.0 ($18.75)    $ 500.00
Winnie Chen          40.0 ($11.45)    5.5 ($17.17)    $ 552.46
Jack Donovan         40.0 ($16.80)   20.0 ($25.20)    $1176.00
Francine Jackson     35.0 ($19.00)    0.0 ($28.50)    $ 665.00
-----------------------------------------------------------------
Â
Total Regular Hours Worked: 155.0
Total Overtime Hours Worked: 25.5
Percentage of Total Hours That Are Overtime: 14.1%
Â
Total Regular Wages: $2295.00
Total Overtime Wages: $598.46
Â
Total Wages This Period: $2893.46
Â
Â
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly