Question: Draw a flowchart that would provide a workable solution to the following problem. Management wants a printed report that lists a workers name and number
Draw a flowchart that would provide a workable solution to the following problem.
Management wants a printed report that lists a workers name and number of hours of overtime worked that week. The overtime is the hours worked minus 40. At the end of the report there must be a number that shows the total of all overtime worked that week.
1. The data is in a file on a disk.
2. Each record contains the required fields and may include fields that are not needed for this problem. This means that the employees name and hours worked are part of the record; their employee number, address, date of birth etc. may also be part of the record.
3. The end of file record will contain **.* in the hours worked field. For a flowchart this specific information is not necessary. It is a given that there will be something to indicate that all the records have been processed.
4. If a person did not work overtime that week, their name should not appear on the list. Their employee record will be in the file but the hours worked will be not be over 40.
5. For this assignment assume that the file will be read from disk one record at a time. (Read one record, process that record, print the report line if the person worked overtime, then get the next record.)
6. Remember that the report must include the total amount of overtime worked that week. There will need to be a step in the loop to calculate this.
7. Assume that the file has been verified and there will be no errors. This means that there will not be any records without a name or hours worked.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
