IT consultancy business.
The class should contain a constructor that instantiates the class by requesting the basic pound-per-hour consultancy rate. You also should implement support for the following operations:
- Charging a client according to the rate and time;
- Paying the tax;
- Informing the user of the current balance and the time worked out, and additionally notifying when the time goes higher than the threshold of 12.
These three operations should be implemented by methods with the following signatures:
public void charge(double rate, int hours)
This method adds the rate*hours product to the balance. You must ensure that that the product is greater than or equal to zero.
public void paytax(double rate, int hours)
This method subtracts the 20% tax from the balance if the number of hours is greater than 3, otherwise the tax is 5%.
public void report ()
This method displays to the screen the account balance and the total number of hours after all uses of the class.
You may add any additional methods you require to enable the above functionality.