[SOLVED] Noobie - Calculating Percentages
I am trying to write a method that interprets an argument (int tax) as a percentage, and then debits an account balance by that percentage of the balance and then return the amount debited. I have no experience of calculating percentages :-(
The code so far is:
public double tax(int tax)
percentage = (tax)/100;
this.setBalance(this.getBalance() ..... at this point I am lost.
Do I this.getBalance * percentage? and how do I show the amount debited as the answer.
Any help would be gratefully appeciated.
All the best - FMJ.