Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package bank;
- /**
- *
- * @author Monty
- */
- import java.util.Scanner;
- import java.text.NumberFormat;
- import bank.Account;
- import bank.Customer;
- public class Bank {
- public static void main(String[] args) {
- String addres, town, state, zip, ans;
- Scanner input = new Scanner(System.in);
- System.out.print("Change address? (y/n): ");
- Account munozAccount = new Account(250, "Maria", "Munoz", "110 Glades Road", "Mytown", "FL", "57684");
- double data;
- NumberFormat money = NumberFormat.getCurrencyInstance();
- System.out.println(munozAccount);
- System.out.print("Enter deposit amount: ");
- data = input.nextDouble();
- munozAccount.deposit(data);
- System.out.println("Balance is: " + money.format(munozAccount.getBalance()));
- System.out.print("Enter withdrawal amount: ");
- data = input.nextDouble();
- munozAccount.withdrawal(data);
- System.out.println("Balance is: " + money.format(munozAccount.getBalance()));
- System.out.println("\n" + "\t Corrected Address: ");
- munozAccount.changeAddress("141 Sunset Drive", "St.Thomas", "Ontario", "N5R3C2");
- System.out.println(munozAccount);
- }
- }
Add Comment
Please, Sign In to add comment