Assignment
Two
This
assignment
is to process a series of bank transactions (deposits and
withdrawals) using the BankAccount
class. The program must:
ยทUse JOptionPane to prompt the user to input a customer's account number and construct an account in a BankAccount variable. Note: Account numbers are 1 to 9 digits.
Using a while loop to prompt the user to input a sequence of transactions in the format
deposit 1000 for a deposit or
withdraw 500.66 for a withdrawal
Use the Scanner class to get the transaction and the amount
Use the BankAccount variable to process the transactions as they are input and use a String variable to accumulate each transaction in text form using a currency format. See the Format Example to see how use a currency format.
Exit the while loop when the user chooses cancel on the JOptionPane window.
Use JOptionPane to display the series of transactions (like a bank statement) along with the final balance in a JTextArea.
The output should look something like:
Transactions for account number 1234567
deposit:
$1000.00
withdraw: $500.00
deposit: $1200.00
withdraw:
$567.99
withdraw: $100.00
After
transactions balance is $1,032.01
The assignment is due
on Wednesday February 4th at the beginning of class. The
will be a quiz at that time.