Posted by Paul on Tuesday, April 3, 2012 at 2:07pm.
If I were to code this program, I would start from the user's point of view, namely start appropriate action as soon as possible, such as when an error is discovered.
For the first part, the code is generally correct, but I suggest making change to avoid the following dialog:
Please enter Employee Name
-1
Please enter Employee ID number
123456789
Please enter Hours Worked
0
Goodbye
Once the Employee Name is entered as -1, users expect to either quit the program or see the "goodbye" message.
They would be wondering what's the point of entering EmployeeID and hours worked, which are no longer relevant.
For number 2, it's a similar comment. In addition, the entry of EmployeeID can be modified to let the user immediately correct the ID right after he entered an invalid one, such as:
output "Please enter Employee ID number"
input EmployId
while EmployID is <1 or > 599
output "Incorrect Employee ID number, Please enter ID value 1- 599"
input EmployId
endwhile
This will take care of the problem on the spot.
Otherwise, the pseudocode looks quite logical.
Related Questions
programming - write a program in C# that calculates and prints the take home pay...
programming - write a payroll program that promt a user to enter his name,hourly...
computer programming - small startup software developer company needs to create ...
business - can someone help me with some information on each one of this. ...
business - can someone help me with some information on each one of this. ...
business accounting - can someone help me with some information on each one of ...
computer Programming - A small startup software developer company needs to ...
Programming with Eclipse - Design, implement, test, and debug an application to ...
Java - You are to create an efficient OO application to be used by the wait ...
programming MIPS ask - Write a MIPS assembly language program that will cover ...
For Further Reading