We are trying to write a simple program for simulating depos…
Questions
We аre trying tо write а simple prоgrаm fоr simulating deposits and withdrawals in a bank. The following Main class uses two classes: Bank and Customer. The Main class is complete and correct. Your task is to write the Customer class so that the program behaves as described by the comments in the Main class. The Bank class is provided below so you can see the expected style and level of detail. public class Main { public static void main (String[] args) { // Create two customers with: // name, starting balance. Customer alice = new Customer("Alice", 500); Customer bob = new Customer("Bob", 200); // Create a Bank object for customers to interact with. Bank bank = new Bank(); // Deposit money into Alice's account; // Alice's balance should now be 600. bank.deposit(alice, 100); // Withdraw money from Bob's account; // Bob's balance should now be 150. bank.withdraw(bob, 50); // Attempt to withdraw too much money; // Bob's balance should still be 150. bank.withdraw(bob, 500); int aliceBalance = alice.getBalance(); // value should be 600 int bobBalance = bob.getBalance(); // value should be 150 }} As promised, here is the implementation of the Bank class: class Bank { // Increase customer's balance by amount if amount > 0. public void deposit(Customer customer, int amount) { if (Customer.isMoreThanZero(amount)) { customer.addToBalance(amount); } } // Decrease customer's balance by amount if 0 < amount