Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Eureka Lumber Company would like to calculate the gross pay for its employees. T

ID: 3718199 • Letter: E

Question

Eureka Lumber Company would like to calculate the gross pay for its employees. The employees information is stored in a file as name ID_number pay_type pay_rate hours_worked. The fields are separated by a tab “ ” delimiter, and they are described as follows: a. name is a string value b. ID_number is a numeric integer value c. pay_type is a character, either H for hourly, or S for salary d. pay_rate will hold the hourly rate for an hourly pay_type, or it would hold the total salary for a salary pay_type. e. hours_worked holds the total number of work hours for the employee The employee gross pay is compute as follows: If employee pay_type is hourly gross pay = pay_rate * hours_worked Else if employee pay_type is salary based gross pay = pay_rate Develop a solution for the problem of reading each employee’s information from the file, computing her gross pay, and then printing out all the employee information along with her gross pay. Your solution development should include: 1. PAC 2. Interactivity Chart 3. IPO Chart 4. Algorithms

Explanation / Answer

A psudo code is given here.

File contains (ID_number, pay_type, pay_rate, hours_worked)

Gross Pay for each employee will be pay_rate x hours_worked

1. Read file content line by line

2. for each line in file

Get pay_rate and  hours_worked

Calculate gross_pay = pay_rate x hours_worked

Print ID_number, pay_type, pay_rate, hours_worked, gross_pay

Continue to step 2

3. End when there is no line left in the file

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote