Question: Add a condition to the deposit method of the BankAccount class in Section 22.5, restricting deposits to $100,000 (the insurance limit of the U.S. government).
Add a condition to the deposit method of the BankAccount class in Section 22.5, restricting deposits to $100,000 (the insurance limit of the U.S. government). The method should block until sufficient money has been withdrawn by another thread. Test your program with a large number of deposit threads.
Step by Step Solution
3.33 Rating (156 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
