(Solved):Suppose the following BankAccount class has been created: public class BankAccount String name; double balance; public void deposit(double amount) balance = balance + amount; public void… View Answer…

 

Question

Suppose the following BankAccount class has been created:

public class BankAccount {

      String name;

      double balance;

      public void deposit(double amount) {

         balance = balance + amount;

   }

   public void withdraw(double amount) {

      balance = balance ? amount;

   }

}

Add a field to the BankAccount class named transactionFee for a real number representing an amount of money to deduct every time the user withdraws money. The default

Scroll to top