This exercise is built on Exercise 1 - Simulation 1. And the following are the things you should do:
Add a queue field in the bank to store the bank queue.
queue
Add a Task abstract class, with two concrete classes extending from Task to represent the DepositTask and Withdrawal Task respectively.
Task
DepositTask
Withdrawal Task
Change the operating logic and printing content of some Events
Event
Basically, the UML is quite similar to the Ex1's. The "difficult" point lies in finding the correct logic to trigger each event.
Last updated 11 months ago