title: Programming my bankAccount program to deduct a set number of fees every month how?
body: <p>I have a very  basic BankAccount class and tester. </p>
  
  <pre><code>/** A bank account that has a balance that can be changed by depositing and withdrawals also deducts a fee for each withdrawal and deposit.
   * 
   * @author lapenta1
   *
   */
  
  public class BankAccount 
  {
  
      private double balance;
      private double feeCharge;
  
      /** Contructs a bank account with a balance of zero
       * 
       */
      public BankAccount()
      {
          balance = 0;
          feeCharge = 2.50;
      }
      /**Constructs a bank account with a given balance
       * 
       * @param initialBalance the initial balance
       */
      public BankAccount(double initialBalance)
      {
          balance = initialBalance;
      }
      /** Deposits money into the bank account
       * 
       * @param amount the amount to deposit
       */
      public void deposit(double amount)
      {
          balance = balance + amount - feeCharge;
      }
      /**Withdrawals money from the bank account
       * 
       * @param amount the amount to withdrawal
       */
      public void withdraw(double amount)
      {
          balance = balance - amount - feeCharge;
      }
      /**Gets the current balance of the bank account
       * 
       * @return the current balance
       */
      public double getBalance()
      {
          return balance;
      }
      public void deductMonthlyCharge()
      {
  
      }
  }
  </code></pre>
  
  <p>This is the tester class</p>
  
  <pre><code>public class BankAccountTester 
  {
  
      public static void main(String[] args) 
      {
          BankAccount myWallet = new BankAccount();
          myWallet.deposit(200);
          System.out.println(myWallet.getBalance());
  
          BankAccount otherWallet = new BankAccount();
          otherWallet.deposit(200);
          System.out.println(otherWallet.getBalance());
  
      }
  
  }
  </code></pre>
  
  <p>now I am trying to make it work so there is basically a set amount of withdrawals/deposits that can be used before the 2.50 fee is taken away every month. The only hint I have is to use math.max(actual transaction count, free transaction count) I am lost! any help?</p>