Define a class called incometax the class accepts a value


The island nation of baloo charges its citizens an income tax each year. The tax rate is based on the following:
Earned Income - tax rate
$0-$9,000 - 0%
$10,000-$19,000 - 2%
$20,000-$29,999 - 3%
$30,000-$39,999 - 4%
$40,000 or more - 5%

define a class called IncomeTax. The class accepts a value represeting the individual's income.

In your solution, account of the following:
a. a constructor that accepts and initializes an instance variable representing the individual's salary
b. an accessor method that validates the salary as being a positive value
c. a mutator method that determines how much tax an individual should pay
d. define the percentage as class constants
e. declare any instance variables that you think are necessary for this class

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Define a class called incometax the class accepts a value
Reference No:- TGS02374234

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)