Question: Description: Create a BankAccount class that models a typical bank account where you deposit and withdraw money. To keep things simple, assume this bank account

Description:
Create a BankAccount class that models a typical bank account where you deposit and withdraw money. To keep things simple, assume this bank
account deals only with integer amounts.
Provide a constructor that allow you to create and initialize the bank account.
Provide a toString method that displays account information.
Provide a getBalance method that returns the current balance.
Provide both withdraw and deposit methods.
Provide exception handling.
Create a BankAccountException class.
Withdraw method must throw BankAccountException for insufficient funds.
Deposit method must throw BankAccountException for deposit amount less than zero (cannot allow negative deposit).
Create an application called Bank that demonstrates that the BankAccount class works correctly.
Description: Create a BankAccount class that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!