Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that calculates customers' income taxes using the following rules: The amount of taxes owed equals the taxable income times the tax rate.

image text in transcribed

Write a program that calculates customers' income taxes using the following rules: The amount of taxes owed equals the taxable income times the tax rate. Taxable income equals gross income minus $1,000 for each exemption. The taxable income cannot be less than zero. The tax rate is computed using the following table: Filing Status Taxable Income Tax Rate single irrelevant 20% married irrelevant 25% cohabiting less than $20,000 10% $20,000 - $50,000 15% more than $50,000 30% For each customer processed, the program should print the customer's tax rate, taxable income, and taxes owed. The program should allow the user to process additional customers as long as he/she enters y' or 'Y' in response to a Process another customer? (y): "prompt. The program should perform input validation for the customer's filing status (only 's', 'S', 'm', 'M', 'c', and 'C' are acceptable). Use a switch statement when calculating a customer's tax rate. Combine related case choices by putting them on the same line. For example, since the user may enter either s' or 'S' to indicate single, use an appropriate multi-label case clause (this varies depending on the switch version you use in your code). Use an appropriate do loop. a) Write and debug a Java program for this algorithm. It should be able to produce the customer data correctly. Come up with your own customer details. b) As an option, perform input validation for the other input entities: gross income (>= 0.0), number of exemptions (>= 0)

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

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

What are Fatty acids?

Answered: 1 week ago

Question

What are Electrophoresis?

Answered: 1 week ago

Question

=+4 What are non-union workers representations?

Answered: 1 week ago