Checkout
checkout
view
Your Cart Your Cart: item(s)
Add to Shopping Cart
$2.19 Instant Download
Computer Science, Data Structures and Algorithms
Year 1

Control structures


I am asked to generate a set of INPUT TEST VALUES. Is that included into this control structure, or do I have to create a whole different set of variables?

(if you have to create an extended set of variables please return posting so I can add more credits.)

Declared Variables

Input: salary in real
Output: tax in real
Other: baseTax in real, minimum in real, Excess in real

Control Structure: if-then-else (dual alternative)

Method Taxation:
Begin
If salary is negative exit with error

If salary <= 1499.99 then
Minimum = 0
baseTax = 0
Excess = 0.15
tax = calculateTax(minimum, baseTax, Excess, salary)

Else If salary <= 2999.99 then
Minimum = 1500
baseTax = 225
Excess = 0.16
tax = calculateTax(minimum, baseTax, Excess, salary)

Else If salary <= 4999.99 then
Minimum = 3000
baseTax = 465
Excess = 0.18
tax = calculateTax(minimum, baseTax, Excess, salary)

Else If salary <= 7999.99 then
Minimum = 5000
baseTax = 825
Excess = 0.20
tax = calculateTax(minimum, baseTax, Excess, salary)

Else If salary <= 14999.99 then
Minimum = 8000
baseTax = 1425
Excess = 0.25
tax = calculateTax(minimum, baseTax, Excess, salary)

showTax()

End Taxation

Subroutine calculateTax:
calculateTax(baseTax, salary)
Begin
Tax = baseTax + (salary – minimum) * Excess
Return Tax
End calculateTax

Subroutine showTax:
showTax()
Begin
Print “The Tax amount is ”, tax
End

By OTA:  Abdun Mahmood, PhD

OTA Rating:  4.9/5

Your Price:  $2.19  (original value ~$7.98)

What's included:

  • Plain text response
$2.19 Download Add to Cart

Add to Shopping Cart
$2.19 Instant Download
Control Structures - You are an accountant setting up a payroll system for a small firm. Each line of the table in Appendix G indicates an employee’s salary range and corresponding base tax amount and tax percentage. Given a salary amount, the tax is calculated by adding the base tax for that salary range and the product of percentage of excess and the amount of salary over the minimum salary for ...
Array process - Simple Array Process • Input a list of employee names and salaries, and determine the mean (average) salary as well as the number of salaries above and below the mean. Use the top-down modular approach and pseudocode to design a suitable program to solve it. Please generate only the pseudocode (a simple one) - No charting is required, but you may have to incorporate the bubb...
Java programming - 1. Modify the Payroll Program so that it uses a class to store and retrieve the employee's name, the hourly rate, and the number of hours worked. 2. Use a constructor to initialize the employee information, and a method within that class to calculate the weekly pay. Once stop is entered as the employee name, the application should terminate. Make sure the program maintains ...
HTML Converison - Decode the HTML lised in Appendix C
Develop the pseudocode for the program design. - Complete the hierarchy chart in Appendix H and the flowcharts in Appendix I for a currency conversion program.

Page generated in 0.0442 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples