Determine the tax rate

Assignment Help Basic Computer Science
Reference no: EM13307030

Use the following income ranges and corresponding tax rates:
under $25,000= 2% income tax
$25,000-$49,999=5% income tax
$50,000-$74,999=10% income tax
$75,000-99,999= 15% income tax
$100,000 and over = 20% income tax

In the calculateJJButtonActionPerformed method (lines 110-118 in the template), insert a switch statement at line 114 to determine the tax rate and assign it to the double variable taxRate (declared on line 112). The int variable salary (line 113) contains the salary input by the user. Use the controlling expression salary / 25,000 to determine the tax rate. If the salary is less than $25000, the controlling expression's value will be 0. For salaries in the range $25,000-$49,999, the controlling expression's value will be 1. For salaries in the range $50,000-$74,999, the controlling expression's value will be 2. for salaries in the range $75,000-$99,999, the controlling expression's value will be 3. For all other salaries, use the default case.

After the switch statement you inserted in Step c, insert a statement that calculates the person's income tax by multiplying the salary and taxRate values, then stores the result in the double variable incomeTax. after the statement that creates the DecimalFormat called dollars, insert a statement that formats the value of incomeTax and displays the formatted value in incomeTaxJTextField.

Reference no: EM13307030

Questions Cloud

Calculate diameter and depth of circular sedimentation basin : Calculate the diameter and depth of a circular sedimentation basin for a design flow of 3800 m3/day based on an overflow rate of 0.00024 m/s and a detention time of 3 hr.
Evaluate the following postfix expressions : Evaluate the following postfix expressions by using the algorithm given. Show the status of the stack after each step of the algorithm. Assume that division is integer division as in java and the identifiers have the following values: a=7;b=3;c=12..
Allele & genotype frequencies assuming hwe : Part a asked to find allele & genotype frequencies assuming HWE.
Determine the pressure head required from the pump : A pump is necessary to lift water from the clear well (reservoir) at a water treatment plant to a storage tower 50-ft high and some distance away. A flow rate of 15 cubic per second (cfs) is required (68F).
Determine the tax rate : 1. For salaries in the range $50,000-$74,999, the controlling expression's value will be 2. for salaries in the range $75,000-$99,999, the controlling expression's value will be 3. For all other salaries, use the default case.
What fraction of the volume of the sphere is submerged : a 4.6kg sphere made of metal whose density is 3800kg/m^3, is suspended by a cord. What fraction of the volume of the sphere is submerged
Communications management plan : You are managing a server installation project that has stakeholders in Sacramento, CA; Colorado Springs, CO; Dallas, TX; Nashua, MA; London, England; and Baumholder, Germany. Use your imagination and the Greer Communications Planner template to buil..
What are the subdivisions of biology : What are the subdivisions of biology
What is the force of the hill on the car : A car and driver have a combined mass of 100 kg. What is the force of the hill on the car as it passes over the top

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create a new group called mygroup

Directions: As you complete each of the following steps, keep track of what occurs at each point, including what you type, the output given, and if you experience any errors.

  What are difference between oop and object orinted design

What is the difference between object oriented programming and object oriented design

  Write a c program using the fork() system

Write a C program using the fork() system call that generates this sequence in the child process. The starting number will be provided from the command line. For example, if 8 is passed as a parameter on the command line, the child process will ou..

  What is an unbreakable uml diagram

What is an "unbreakable" UML diagram. I have a Java assignment, and it's asking for this requirement, but I have never seen or heard of one. A link where I can see the definition and an example would be awesome. Thanks

  Write a method, insertat, that takes four parameters

write a method, insertAt, that takes four parameters: an array of integers; the length of the array; an integer, say insertItem; and an interger, say, index.

  Write an application that reads a series of pairs of numbers

A website sells three products whose retail prices are as follows: product 1, $2.98; product 2 $4.50; and product 3, $9.98. Write an application that reads a series of pairs of numbers.

  Draw the uml diagram and implement

Draw the UML diagram and implement the new GeometricObject class. Write a test program that uses the max method to find the larger of two circles and the larger of two rectangles.

  Explaining logical knowledge base represents the world

A logical knowledge base represents the world using a set of sentences with no explicit structure. Analogical representation, on the other hand, has physical structure that corresponds.

  Networks present of opportunities for security challenges

1. Networks present a lot of opportunities for security challenges. What type of network are you on, and what security elements are employed? Are they effective? Why or why not?

  Monitoring performance of it acquisition projects

Who is or should be responsible for monitoring the performance of IT acquisition projects and taking action that may result in cancelling the project?

  Task manager to recognize and troubleshoot problems

Which system resources are probable to be at root of problem? How can you use system tools, like the Task Manager, to help recognize and troubleshoot these problems?

  Can a quantum computing bit-s multiple states contribute

Can a quantum computing bit's (qbit's) multiple states contribute any more computing power or hold any more extraordinary mathematical control/significance.

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