import javax.swing.JOptionPane; import java.text.DecimalFormat; public class Ex28_AccountTest { public static void main(String[] args) { String input; DecimalFormat dollar = new DecimalFormat("#,###.00"); input = JOptionPane.showInputDialog("What is your account's starting balance"); Ex28_BankAccount account = new Ex28_BankAccount(input); input = JOptionPane.showInputDialog("How much were you paid this month?"); account.deposit(input); JOptionPane.showMessageDialog(null, "Your current balance is $ "+dollar.format(account.getBalance())); input = JOptionPane.showInputDialog("How much would you like to withdraw?"); account.withdraw(input); JOptionPane.showMessageDialog(null, "Your current balance is $ "+dollar.format(account.getBalance())); System.exit(0); } }