Appendix G
Sequential and Selection Process Control Structure
In the following example, the second line of the table specifies that tax due on a salary of $2000.00 is $225.00 plus 16% of excess salary over $1500.00 (that is, 16% of $500.00). Therefore, the total tax is $225.00 + $80.00, or $305.00.
| |Salary Range in Dollars |Base Tax in Dollars |Percentage of Excess |
|1 |0.00-1,499.99 |0.00 |15 % |
|2 |1,500.00-2,999.99 |225.00 |16 % |
|3 |3,000.00-4,999.99 |465.00 |18 % |
|4 |5,000.00-7,999.99 |825.00 |20 % |
|5 |8,000.00-14,999.99 |1425.00 |25 % |
| | | | |
|Input |Processes |Output |
|First Name |1. Get User Input |First Name |
|Last Name | |Last Name |
|Salary | |Salary |
|Salary |2. Determine Range Category |Salary Range |
|Salary Range Category |3. Determine Base Tax and Percentage of |Percentage Excess Total |
|Percentage of Excess |Excess |Base Tax |
|Base Tax | | |
|Salary |4. Determine Gross Salary |Gross Salary |
|Percentage Excess Total | | |
|Base Tax | | |
|First Name |5. Display Gross Salary |First Name |
|Last Name | |Last Name |
|Salary | |Salary |
|Gross Salary | |Gross Salary |
Main Module
Declare Name as string
Declare SalaryAmt as real
Declare Base as real
Declare Excess as real
Declare Salary as real
Declare ReRun as string
Call Input Data Module
Call Range Module
Call Salary1 Module
Call Salary2 Module
Call Salary3 Module
Call Salary4 Module
Call Salary5 Module
Call Output Module
End Main Module
Input Data Module
Write, “Insert Employee’s First Name”
Input FirstName
Write, “Insert Employee’s Last Name”
Input LastName
Write, “What is the employee’s salary?”
Input SalaryAmt
Call Range Module
End Input Data Module
Range Module
If SalaryAmt < 1,499.99
Then Call Salary1 Module
Else
If SalaryAmt < 2,999.99 AND SalaryAmt > 1,500.00
Then Call Salary2 Module
Else
If SalaryAmt < 4,999.99 AND SalaryAmt > 3,000.00
Then Call Salary3 Module
Else
If SalaryAmt < 7,999.99 AND SalaryAmt > 5,000.00
Then Call Salary4 Module
Else
If SalaryAmt < 14,999.99 AND SalaryAmt > 8,000.00
Then Call Salary5 Module
Else
Write,” The salary you have entered is out of range. “
Write,” Please enter a salary between 0 and 14,999.99.”
Call Input Module
End Range Module
Salary 1 Module
Declare Excess as real
Declare Salary as Real
Set Excess = SalaryAmt * .015
Set Salary = SalaryAmt - Excess
Call Output Module
End Salary1 Module
Salary2 Module
Declare Base as real
Declare Excess as real
Declare Salary as real
Set Base = SalaryAmt - 225
Set Excess = Base * .16
Set Salary = Base - Excess
Call Output Module
End Salary2 Module
Salary3 Module
Declare Base as real
Declare Excess as real
Declare Salary as real
Set Base = SalaryAmt - 465
Set Excess = Base * .18
Set Salary = Base - Excess
Call Output Module
End Salary3 Module
Salary4 Module
Declare Base as real
Declare Excess as real
Declare Salary as real
Set Base = SalaryAmt - 825
Set Excess = Base * .20
Set Salary = Base - Excess
Call Output Module
End Salary4 Module
Salary5 Module
Declare Base as real
Declare Excess as real
Declare Salary as real
Set Base = SalaryAmt - 1425
Set Excess = Base * .25
Set Salary = Base - Excess
Call Output Module
End Salary5 Module
Output Module
Declare ReRun as string
Declare FirstName as string
Declare LastName as string
Declare Salary as real
Write,” The following is the gross salary for,” FirstName LastName
Salary
Write, “Would you like to enter more salaries? Enter Y or N”
Input ReRun
If ReRun = “Y”
Then Call Input Module
Else
If ReRun = “N”
Then End
Else
Write, “Incorrect key entered. The program will now terminate.”
End
End Output Module
Test Values
|Input |Expected Output |Comments |
|FirstName = Roger | | |
|LastName = Clark |The following is the gross salary for Roger|________ |
|Salary = 11,200.00 |Clark: 7331.25 | |
| FirstName = Bill | | |
|LastName = Wilson |The following is the Gross Salary for Bill |________ |
|Salary = 1,200.00 |Wilson: | |
| |1020.00 | |
| FirstName = George | | |
|LastName = Washington |The following is the Gross Salary for |_________ |
|Salary = 3,500 |George Washington: 2488.70 | |
You May Also Find These Documents Helpful
-
Using the tax planning worksheets in George’s 2013 personal return, project the amounts that George would owe if he took a salary of $40,000. George would be EI exempt, but he would be subject to CPP deductions and OHIP.…
- 462 Words
- 2 Pages
Satisfactory Essays -
Tax = [(assessable income – deductions) x rate] – offsets ( note there is a order for these) –payg(w) (at the very end +- any levies)…
- 4963 Words
- 20 Pages
Powerful Essays -
-If the Salary Range is greater than 5,000.00, then the tax base is $825.00 plus 20% of the amount in excess of 5,000.00 (amount-5,000.00*20%+825.00)…
- 516 Words
- 3 Pages
Satisfactory Essays -
In the following example, the second line of the table specifies that tax due on a salary of $2,000.00 is $225.00 plus 16% of excess salary over $1,500.00 (that is, 16% of $500.00). Therefore, the total tax is $225.00 + $80.00, or $305.00.…
- 321 Words
- 2 Pages
Satisfactory Essays -
FICA Taxes Payable – OASDI 20.1 898.05 FICA Taxes Payable – HI 20.2 210.03 FUTA Taxes Payable 21 5.16 SUTA Taxes Payable – Employer 22 128.01 Net Paid Amount: Nov. 6 $10,937.71 Nov. 13 1,418.87 Nov. 20 8,281.28…
- 171 Words
- 2 Pages
Satisfactory Essays -
Write " Thank you, please type 'X' to exit or 'Y' to enter another salary amount "…
- 671 Words
- 3 Pages
Powerful Essays -
b. Amount of the employer’s FICA taxes for the weekly payroll? OASDI $76.92 HI $17.99 Total FICA = $94.91…
- 541 Words
- 3 Pages
Good Essays -
will be taxed after deducting any business expenses. The $300,000 is included in John’s Gross…
- 1416 Words
- 7 Pages
Good Essays -
How is an individual's tax liability calculated? First obtain a Form 1040 or 1040ez with instruc-tion. Two separate documents that can be downloaded from the IRS website. Total income in-cludes wages, salary and tips. Calculate gross income, allow deductions. Then look up your standard deduction on Form 1040. Choose whichever of these two figures is largest and subtract it from your adjusted gross income. Calculate your taxable income. Multiply $3,800 by the number of exemptions. Calculate total tax this is done by multiplying your tax rate by your taxa-ble income. Your tax rate is determined by your taxable income and can be found in your In-structions book.…
- 305 Words
- 2 Pages
Good Essays -
FEDERAL INCOME TAX FORMULA Gross Income - Above the Line Deductions____ Adjusted Gross Income - Itemized or Standard Deduction - Exemptions_________________ Taxable Income x Applicable Marginal Tax Rates for Each Bracket Tax Liability - Tax Credits_________________ = TAX OWED ABRIDGED INCOME TAX ACCOUNTING I. Gross Income [§ 61] — A. Wages, Salaries, and Tips B. Interest Income C. Dividend Income D. Other (Net) Income—Reduced by Deductible Expenses 1.…
- 257 Words
- 2 Pages
Satisfactory Essays -
1. What is the relevant labor market for these jobs? How big are the differences between salaries in different locations?…
- 685 Words
- 3 Pages
Satisfactory Essays -
boxes with an “X”. Two copies MUST be filed with the BIR and one held by the Tax Filer.…
- 1618 Words
- 16 Pages
Powerful Essays -
Reaction mechanism of tert-butylation of phenol with tert-butyl alcohol over H-beta zeolite: An ONIOM study…
- 2320 Words
- 10 Pages
Good Essays -
1. Feedforward controls ม* ุ ง เน, น การควบคุ ม ก* อ นเริ ่ ม กระบวนการ เพื่อการปJองกันไม*ให,เกิดปKญหา เช*น การ ซ*อมบำรุงเครื่องจักรอุปกรณ;ตามระยะเวลา ระบบความปลอดภัย การฝRกอบรม ระบบงบ ประมาณ…
- 1390 Words
- 6 Pages
Satisfactory Essays -
What problems do you think might be associated with bringing customers together in the way that Boeing did?…
- 383 Words
- 2 Pages
Satisfactory Essays