public class Account { private int _balance; private static int _funds = 0; public Account(int balance0) { if (balance0 < 0) { throw new IllegalArgumentException("negative deposit"); } _balance = balance0; _funds = balance0; } public int balance() { return _balance; } public static int funds() { return _funds; } public int deposit(int amount) { if (amount < 0) { throw new IllegalArgumentException("negative deposit"); } _funds += amount; _balance += amount; return _balance; } public int withdraw(int amount) { if (_balance < amount) throw new IllegalStateException("Insufficient funds"); _funds -= amount; _balance -= amount; return _balance; } }