Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java help: The original U.S. income tax of 1913 was quite simple. The tax was 1 percent on the first $50,000 2 percent on the

Java help:

image text in transcribedimage text in transcribed

The original U.S. income tax of 1913 was quite simple. The tax was 1 percent on the first $50,000 2 percent on the amount over $50,000 up to $75,000 3 percent on the amount over $75,000 up to $100,000 4 percent on the amount over $100,000 up to $250,000 5 percent on the amount over $250,000 up to $500,000 6 percent on the amount over $500,000. There was no separate schedule for single or married taxpayers. Write a program that accepts an income (double) and computes the income tax according to this schedule. Hints; You should use a series of nested if-elses to determine the correct bracket -OR You can use a sequence of independent if statements starting from the highest amount to the least amount Once you know which type of if statements you will use put print statements within to see if your logic is correct. . Be careful of boundary amounts. For example the 2% applies to $50,000.01 to $75,000.00 inclusive Some of the tax amounts can be pre-computed Java doesn't allow commas within integer/floating point number, however it does allow underscores, e.g. 50 000. Be sure to run/pass all of the tests before submitting

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

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago