--Cheryl Earnest (cherie) 593-48-8506 --Intro to Computer Science Lab --Assignment 2 Due: September ? with Text_Io; use Text_Io; procedure cherieprog2 is package flt_io is new Float_Io(Float); package int_io is new Integer_Io(Integer); package boolean_io is new enumeration_io(Boolean); name: String(1..30); length: Integer; hours_worked: Float; hourly_rate: Float; dependents: Float; union_member: Character; union_dues: Float; federal_tax: Float; social_security: Float; gross_pay: Float; procedure gross(hours_worked, hourly_rate: in Float; gross_pay: out Float) is overtime: Float; regular: constant := 40.0; begin if hours_worked > regular then overtime := hours_worked - regular; gross_pay := ((hours_worked * hourly_rate) + (overtime * 1.5 * hourly_rate)); elsif hours_worked <= regular then overtime := 0.0; gross_pay := (hours_worked * hourly_rate); end if; end gross; function tax(gross_pay, dependents: Float) return Float is begin if gross_pay > 150.0 then return(gross_pay - (13.0 * dependents)); elsif gross_pay <= 150.0 then return(0.0); end if; return(0.0); end tax; function ssecurity(gross_pay: Float) return Float is begin if gross_pay > 150.0 then return(0.052 * gross_pay); elsif gross_pay <= 150.0 then return(0.0); end if; return(0.0); end ssecurity; function union(gross_pay: Float) return float is begin return(0.0675 * gross_pay); end union; procedure net(gross_pay, federal_tax, social_security, union_dues: Float) is net_pay: Float; begin put("Net pay = $"); net_pay := gross_pay - federal_tax - social_security - union_dues; put_line(net_pay, AFT=>2,EXP=>0); end net; begin put("Enter employee name: "); get_line(name, length); new_line; put("Enter hours worked: "); get(hours_worked); new_line; put("Enter hourly rate: "); get(hourly_rate); new_line; put("Enter number of dependents: "); get(dependents); new_line; put("Is the employee a Union member? (Y/N): "); get(union_member); gross_pay := hours_worked * hourly_rate; new_line; new_line; put("************************************************"); put("Payroll status for "); put(name(1..length)); new_line; gross(hours_worked, hourly_rate, gross_pay); put("Gross pay = $"); put(gross_pay,AFT=>2,EXP=>0); put("Federal tax = $"); federal_tax := tax(gross_pay, dependents); put(federal_tax,AFT=>2,EXP=>0); new_line; put("Social Security = $"); social_security := ssecurity(gross_pay); put(social_security,AFT=>2,EXP=>0); new_line; if union_member = 'Y' then put("Union dues = $"); union_dues := union(gross_pay); put(union_dues, AFT=>2,EXP=>0); new_line; elsif union_member = 'N' then put("No Union dues"); new_line; end if; net(gross_pay, federal_tax, social_security, union_dues); new_line; new_line; put("************************************************"); end cherieprog2;