Question: I need help adding a waitotify solution My code: Account class Bank class BankSimMain class TestingThread class TransferThread class Task 6. The initial code does
I need help adding a waitotify solution
My code: Account class

Bank class


BankSimMain class

TestingThread class


TransferThread class

Task 6. The initial code does not allow an account to transfer out funds if the transferring amount is greater than the account balance. Implement a waitotify solution to defer the transfer until the account balance becomes greater than the transferring amount (assume the account will receive the funds later). 10 11 public class Account { private volatile int balance; private final int id; 12 13 14 15 16 17 18 A 21 22 23 24 25 26 27 public Account(int id, int initialBalance) { this.id = id; this.balance = initialBalance; } public synchronized int getBalance() { return balance; } public synchronized boolean withdraw(int amount) { if (amount
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
