Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Methods.pdf .edu/bbcswe bdav/pid-6007859-dt-content-rid-47834457 1/courses/CP$180-19300-2235 9A-Lab: Methods 1. TaxCalculator.java The 1988 United States Federal Tax Schedule was the simplest in recent times. It had four categories,

image text in transcribed
Methods.pdf .edu/bbcswe bdav/pid-6007859-dt-content-rid-47834457 1/courses/CP$180-19300-2235 9A-Lab: Methods 1. TaxCalculator.java The 1988 United States Federal Tax Schedule was the simplest in recent times. It had four categories, and each category had two rates. Here is a summary (dollar amounts are taxable Incomeli category Category ID Tax Single Head of Household Married, Joint Married, Separate 15% of first $17,850 plus 28% of excess 15% of first $23,900 plus 28% of excess 15% of first $29,750 plus 28% of excess 15% of first $14,875 plus 28% of excess 3 For example, a single wage earner with taxable income of $20,000 dollars owes 0.15 x $17,850+0.28 x ($20,000-$17,850). Write a program that lets the user specify the tax category and the taxable income and then calculate the tax. Make use of at least the following methods: 1) main Construct a loop to allow user calculate tax repeatedly In each iteration (the loop body), call methods in order: get TaxCategory getTaxablelncome calculateTax, and then display the taxable income, the tax, and the net income. Design an exit point for the loop so that under certain condition the loop can be terminated. 2) getTaxCategory Description: Ask user to enter an integer (the category ID) to select tax category Arguments: NULL Return: an integer representing tax category. 3) getTaxableincome .Description: Ask user to enter taxable income Arguments: NULL Return:ll a double type number representing the taxable income 4) calculateTax Description: Calculate the tax based on user provided tax category and taxable income. Arguments: int taxCategory taxableincome double Return:ll a double type number representing the tax to be paid You can use more method if you want Do it incrementally (ie, test each part before you proceed to next port) Declare a scanner outside ony method and inside the class using the following declaration

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago