Monty374

Bank

Nov 14th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. package bank;
  2.  
  3. /**
  4. *
  5. * @author Monty
  6. */
  7. import java.util.Scanner;
  8. import java.text.NumberFormat;
  9. import bank.Account;
  10. import bank.Customer;
  11.  
  12. public class Bank {
  13.  
  14. public static void main(String[] args) {
  15. String addres, town, state, zip, ans;
  16.  
  17. Scanner input = new Scanner(System.in);
  18.  
  19. System.out.print("Change address? (y/n): ");
  20.  
  21.  
  22.  
  23.  
  24. Account munozAccount = new Account(250, "Maria", "Munoz", "110 Glades Road", "Mytown", "FL", "57684");
  25. double data;
  26. NumberFormat money = NumberFormat.getCurrencyInstance();
  27.  
  28. System.out.println(munozAccount);
  29.  
  30. System.out.print("Enter deposit amount: ");
  31. data = input.nextDouble();
  32. munozAccount.deposit(data);
  33. System.out.println("Balance is: " + money.format(munozAccount.getBalance()));
  34.  
  35. System.out.print("Enter withdrawal amount: ");
  36. data = input.nextDouble();
  37. munozAccount.withdrawal(data);
  38. System.out.println("Balance is: " + money.format(munozAccount.getBalance()));
  39. System.out.println("\n" + "\t Corrected Address: ");
  40. munozAccount.changeAddress("141 Sunset Drive", "St.Thomas", "Ontario", "N5R3C2");
  41. System.out.println(munozAccount);
  42. }
  43. }
Add Comment
Please, Sign In to add comment