/* This class is not correct. It needs to be fixed to work in a * sequential setting, and also a multithreaded setting. What must we * do to change it? */ public class BankAccountBuggy { private double balance; public BankAccountBuggy(double initialBalance) { this.balance = initialBalance; } public void withdraw(double amount) { balance -= amount; } public void deposit(double amount) { balance += amount; } public void transfer(double amount, BankAccount other) { this.withdraw(amount); other.deposit(amount); } public double getBalance() { return balance; } }