[SOLVED] Define a class called Tax

21.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Tax.zip (0.4 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

The island nation of Balloo charges citizens an income tax each year the tax rate is based ln

earned income $0-9,000. tax rate 0

$10,000-$19,000 . 2% tax rate

20,000-29,000 . 3% tax rate

$30,000-39,000. 4% tax

$40,000 or more , 5%

define a class called Tax the class accepts the value representing the invisible income

include a constructor that accepts and initializes an instance variable representing the individuals salary

an accessor method that validates the salary as being positive value

a mutator method that determines how much tax an individual should pay

deifne the percentages as class constants

declare any instance variables you think necessary for this class

  • Tax.zip