Question: Tax class First step is to create a class called Tax (Tax.java) it will not contain a main method. The Tax class will be very

Tax class

First step is to create a class called Tax (Tax.java) it will not contain a main method.

The Tax class will be very simple it will contain two private instance variables:

o taxPayerNameasaString o incomeasaninteger

The following public methods will have to be implemented:

o A default constructor

o A parameterised constructor

o Two setmethods(mutators)

o Two getmethods(accessors)

o computeTax()method*

*You will also create a public value returning method to return the calculated tax. The tax can be derived from the calculation according to the tax rates as assignment 1. In other words the tax will be retrieved via your computeTax() method, which is a user-defined method inside the Tax class and it does not contain the keyword static.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!