This pseudo code I wrote is for a class, and I need some guidance and critique on this information. I had a hard time with the Main module. Will this pseudo code work in the real world? Thanks for the help. Also, is there a way to transit through my excess and base modules?
Analysis
Process:
1. Get user input
2. Find Base Tax USD
3. Find Amount of excess Tax USD
4. Display Tax amount USD
Input:
Employee’s name text
Employee’s salary number
Salary Range Amount number
Base Tax Amount number
Excess Tax Amount number
Output
Total Tax Amount (real >0)
Design
Main Module
Declare Base Tax as real
Declare Excess Tax as real
Declare Calculations as real
Call Input Data Module
Call Find Base Tax Module
Call Find Excess Tax Module
Call Calculations Module
Call Output Module
End Main Module
Input Data Module
Write, “What is employee’s name?”
Input EmployeeName
Write, “What is employee’s salary?”
Input SalaryAmount
End Input Data Module
Find Base Tax Module
If Salary is =0.00 - 1,499.99
Then BaseTax is 0.00
If Salary is >=1,500.00=<2,999.99
Then BaseTax is 225.00
If Salary is >=3,000.00=<4,999.99
Then BaseTax is 465.00
If Salary is >=5,000.00=<7,999.99
Then BaseTax is 825.00
If Salary is >=8,000.0=<14,999.99
Then BaseTax is 1425.00
End Find Base Tax Module
ExcessTax Module
If SalaryAmount is >0.00 or =1,499.99
Then (SalaryAmount- 1,499.99)0.15= ExcessTax
If SalaryAmount is >1,500.00 or =2,999.99
Then (SalaryAmount-(1,500.01-2,999.99)0.16= ExcessTax
If SalaryAmount is >3,000.00 or =4,999.99
Then (SalaryAmount-(3,000,01-4,999.99)0.18= ExcessTax
If SalaryAmount is>5,000.00 or =7,999,99
Then (SalaryAmount-(5,000.01-7,999.99)0.20= ExcessTax
If SalaryAmount is >8,000.00 or = 14,999.99
Then (SalaryAmount-(8,000.01-14,999.99)0.25= ExcessTax
End Find ExcessTax Module
Calculations Module
BaseAmount + ExcessTax = TotalTaxAmount
End Calculations Module
Output Module
Write “The Employee’s Name is”, EmployeeName
Write “The Salary Amount is:”, SalaryAmount
Write “The Base Amount is:”, BaseAmount
Write “The Excess Tax Amount is:”, ExcessTax
Write “The Total Tax Amount is:”, TotalTaxAmount
End Output Module