It 210 Appendix G

Submitted by: Submitted by

Views: 1103

Words: 428

Pages: 2

Category: Science and Technology

Date Submitted: 06/30/2012 10:40 PM

Report This Essay

Main Module

Declare FirstName as String

Declare MI as String

Declare LastName as String

Declare Salary as Real

Declare BaseTax as Real

Declare PercentExcess as Real

Declare Tax as Real

Declare GrossIncome as Real

Display “Employee Salary Tax Calculation Program”

Call Input Module

Call Menu Module

Call SalaryRange1 Module

Call SalaryRange2 Module

Call SalaryRange3 Module

Call SalaryRange4 Module

Call SalaryRange5 Module

Call OutPut Module

End Main Module

Input Module

Display “Enter Employee’s First Name”

Input FirstName

Display “Enter Employee’s Middle Initial”

Input MI

Display “Enter Employee’s Last Name”

Input LastName

Call Menu Module

End Input Module

Menu Module

Display “Select Salary Range”

Declare SalaryRange as Integer

Display “1 = $0.00 - $1,499.00”

Display “2 = $1,500.00 - $2,999.99”

Display “3 = $3,000.00 - $4,999.99”

Display “4 = $5,000.00 - $7,999.99”

Display “5 = $8,000.00 - $14,999.99”

Input SalaryRange

If 1 Then

Call SalaryRange1 Module

End If

If 2 Then

Call SalaryRange2 Module

End If

If 3 Then

Call SalaryRange3 Module

End If

If 4 Then

Call SalaryRange4 Module

End If

If 5 Then

Call SalaryRange5 Module

End If

While SalaryRange < 1 OR > 5 Do

Display “You Must Select A Salary Range To Continue”

Input SalaryRange

End While

End Menu Module

SalaryRange1 Module

Set BaseTax = 0.00

Set PercentExcess = Salary * .015

Set Tax = BaseTax + PercentExcess

Set GrossIncome = Salary - Tax

Call OutPut Module

End SalaryRange1 Module

SalaryRange2 Module

Declare Base2 as Real

Set BaseTax = 225.00

Set Base2 = Salary – 1500.00

Set PercentExcess = Base2 * .016

Set Tax = BaseTax + PercentExcess

Set GrossIncome = Salary - Tax

Call OutPut Module

End SalaryRange2 Module

SalaryRange3 Module

Declare Base3 as Real

Set BaseTax = 465.00

Set Base3 = Salary – 3000.00

Set PercentExcess = Base3 * .18

Set Tax = BaseTax + PercentExcess

Set GrossIncome = Salary - Tax

Call OutPut Module

End...