8) All in a Day’s Work is a temporary employment agency. The manager needs to determine how much tax to withhold for each employee. This withholding amount computes as 20 percent of each employee’s weekly pay. The weekly pay is the hourly pay time 40.
A) Design an interactive screen that displays an employee’s weekly pay and withholding amount. The user inputs the hourly pay rate for an employee. Draw the flowchart or write the pseudocode for this program.
B) Design a printed report titled WITHOLDING FOR EACH EMPLOYEE. Input fields include the first and last names of each employee, hourly pay, weekly pay, and withholding amount per week. Draw the flowchart or write the pseudocode for this program.
For (B) I have this, but I'm sure I did it incorrect, and I don't even know where to start on (A). I tired to get teh teacher to help me, but hes a grumpy old man and doesn't want anything to do with his students.
8 –B
Printchart:
WITHOLDING FOR EACH EMPLOYEE
LAST NAME FIRST NAME HOURLY PAY WEEKLY PAY WITHOLD
XXXXXXXXX XXXXXXXXX XXXXXXXXX XXXXXXXX XXXXXXX
XXXXXXXXX XXXXXXXXX XXXXXXXXX XXXXXXXX XXXXXXX
XXXXXXXXX XXXXXXXXX XXXXXXXXX XXXXXXXX XXXXXXX
END OF REPORT
Pseudocode
start
char employeeLast
char employeeFirst
num employeeHourly
num employeeWeekly
num withHold
string HEAD = “WITHOLDING AMOUNT FOR EACH EMPLOYEE”
string COL_HEADS = “LAST NAME FIRST NAME HOURLY PAY WEEKLY PAY WITHOLD”
string FOOT = “END OF REPORT”
print HEAD
print COL_HEADS
get employeeLast, employeeFirst, employeeHourly, employeeWeekly, withHold
while not eof
employeeWeekly = employeeHourly *40
withHold = employeeWeekly * .2
print employeeLast, employeeFirst, employeeHourly, employeeWeekly, withHold
get employeeLast, employeeFirst, employeeHourly, employeeWeekly, withHold
endwhile
print FOOT
end
Like I said, thanks again.
Edited by WingedPanther, 13 February 2009 - 12:17 PM.
add code tags (the # button)


Sign In
Create Account

Back to top









