Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Computer Programming: Java Spring 2021 Programming Assignment 1 Income tax system in a country called Java works as follows: a. An employee has J$4000 of

image text in transcribed
Computer Programming: Java Spring 2021 Programming Assignment 1 Income tax system in a country called Java works as follows: a. An employee has J$4000 of salary tax free. b. The next J$1500 is taxed at 10%. c. The next J$ 28000 after that is taxed at 20%. d. Any further amount is taxed at 40%. Write a Java program to compute the amount of income tax for a given employee. The program reads an employee name and salary then displays the following: Name: X Y Income: whatever X Y income is Tax: whatever income tax X Y has to pay If the user enters an invalid value for income (less than 0), the program displays: Invalid input, income should be zero or more Note: J$ stands for Javean Dollar! Test your program with the following input for income: Notes The program should display the error message above and terminate Salary Income Tax (PS) -1 Invalid Input 4000 0 5000 100 10000 1050 40000 8350 Taxable amount is 1000, 10%* 1000=100 10*1500 + 20-4500 = 150+900-1050 10*1500+28000*20%+ 6500*40%= 150+5600+2600 = 8350 Important Notes: 1. Start your program with an introductory paragraph (comment) which contains your name and describes the program purpose. 2. Use meaningful variables names. 3. All submission should be made via blackboard. Please upload your Java source file and then submit

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

Step: 3

blur-text-image

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

=+j Describe how EU directives impact IHRM.

Answered: 1 week ago

Question

=+and reduction in force, and intellectual property.

Answered: 1 week ago