Bank Transactions Task 1: Write a very primitive class SimpleAccount, which manages a balance and simple methods: PayIn(), withdraw (), getBalance() and setBalance(). The constructor will take an initial value for the account balance. Task 2: Write a class Transaction, which can run as a thread. The constructor takes an array of accounts, an amount and a number of transactions that are carried out. The actual thread code should do the following: Pick up two accounts at random from the array of accounts, and transfers the amount that is specified in the constructor from one account to the other account. This should be as often happen, as indicated in the constructor. Task 3: Write a class AccountShifting, which consists only of a main program that does the following: 1. An array of 10 accounts will be created. 2. The total of all accounts (means sum of all balances) is determined and output. 3. Now 100 transaction objects are created and started. 4. Wait until all transactions has terminated. 5. The total of all accounts (means sum of all balances) is determined and output. Task 4: Run the program many times with the same account balances. It is expected that the transactions interfere with each other and therefore the total is not correct. How can we solve this data inconsistency problem? Please modify the code so that we have safe transactions, i.e., the total of all balances remains consistent after the transactions (means money is neither burnt nor created).