Create a whole different set of variables

Assignment Help JAVA Programming
Reference no: EM13945571

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

Reference no: EM13945571

Questions Cloud

What would you estimate the scrap rate : What would you estimate the scrap rate to be using a 6-month moving average?
How do i created the pseudocode : Using the UML diagram and variable list , create Pseudocode for the program.
State intelligently whether you think : what musical "concept" is illustrated by the selection (e.g. musical idea, ensemble, solo performer, variation, etc.), and state intelligently whether you think the selection was effective in doing so
Governing equations of motion for a two degree : The purpose of this project is to derive the governing equations of motion for a two degree of freedom (planar) gantry-type robot that is commonly called an H-Bot (Fig. 1).
Create a whole different set of variables : 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?
Without assuming anything about the distribution : Without assuming anything about the distribution of the number of hours community college students study per week, at most what percentage of the students study less than 3.7 hours or more than 19.7 hours per week?
Scholarly journals for your field or specialization : For this assignment you will develop a short literature review on the topic (Distance Education and Internet learning) you chose in the first discussion in Unit 2 (See discussion below).
What is the effect of parenting : What is the effect of parenting on some of the parents in the unit thus far? Consider the effect in "I Stand Here Ironing" and "The Egg" and explain your answer.
Provide the analysis and pseudo code only : Display the contents of the file GRADES created in Problem 1. Each student's record should appear on a separate line and include the total score (the sum of the three tests) for that student.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Eliminate the last comma in the string output

Eliminate the last comma in the String Output which includes array output values from "hourlyTemp[i]" (entire list). My guess is that this needs to incorporate "%d" somehow but my online book won't accept the use of "%d" for some reason. From the boo..

  Java programming murach 4th ed 1open the ch06ex1invoice

1.open the ch06ex1invoice project. take a screenshot after you open netbeans and paste it into a word or word

  Define private instance variable to hold boolean value

Write a Java Enumeration "LetterGrade" that represents letter grades A through F including plus and minus grades. Define a private instance variable to hold a boolean value.

  Prompts the user for three first names

Write an application that prompts the user for three first names and concatenates them in every possible two-name combination so that new parents can easily compare them to find the most pleasing baby name. Save the file as BabyNameComparison.java

  Determine the type of moped

Write a driver class called MopedRental. This class should perform the following: asks the user to enter the size of the moped, the day of the week and the number of hours rented, creates the Moped object, based on the size, and displays the input..

  Write a recursive function that finds and returns the sum

Write a recursive function that finds and returns the sum of the elements of an int array. Also, write a program to test your function.

  Create a recursive factorial program

Assignment 1: Create a recursive factorial program that prompts the user for an integer  N  and writes out a series of equations representing the calculation of  N !. For example, if the input is 4, the output could be:

  Write java application that effectively uses java collection

Write a Java application that effectively uses Java collections to store up to 20 instances of the Person class and its subclasses. Then write a GUI that displays the Person names using radio buttons to select a value

  Write a method named validate to help a local banker

write a method named validate to help a local banker. Your method will need to utilize two input parameters and the method's return value (for its output).

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Create a method that would search through an arraylist

What is the best way of the following ways (For each, Iterator, While with index) that you would use to create a method that would search through an ArrayList of files for a certain file and then delete it, and why?

  Write a program that collects three strings

Write a program that collects three Strings from the user. Display the three strings in alphabetical order regardless of the order in which they were input.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd