As can be seen, the first constructor throws a Negative Amount Exception if the balance being used to create the bank account is negative. You will have to create this exception class yourself. The BankAccount class should also contain methods to make a deposit, make a withdrawal, get the current balance, and print a bank account statement. The interfaces for these methods should appear as follows: // update balance by adding deposit amount // make sure deposit amount is not negative // throw exception if deposit is negative
Get Free Quote!
260 Experts Online