Advertisement
Guest User

Untitled

a guest
Aug 12th, 2013
715
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class Main {
  5.  
  6. public static void main(String[] args) {
  7. System.out.println("Welcome To Harry's Bank");
  8.  
  9.  
  10. //Pin System
  11. System.out.println("Please Enter Your Bank Pin.");
  12. Scanner userInput = new Scanner (System.in);
  13. int number;
  14. int password = 7123;
  15. int amount = 4000;
  16.  
  17. number = userInput.nextInt();
  18.  
  19. if (number == password) {
  20. System.out.println("Pin Accepted");
  21. System.out.println("You Have Now Entered Harry's Bank!");
  22. System.out.println("Press The Number Of The Option You Would Like.");
  23. System.out.println("1.Withdraw Money.");
  24. System.out.println("2.Put In Money");
  25. System.out.println("3.Exit Bank");
  26. Scanner Options = new Scanner (System.in);
  27. int option;
  28. option = userInput.nextInt();
  29. }
  30. int option;
  31. if (option == 1){
  32. Option_1 Optionone = new Option_1();
  33. Optionone.Withdraw();
  34. }
  35. if (option == 2){
  36. Option_2 Optiontwo = new Option_2();
  37. Optiontwo.Deposit();
  38. }
  39. if (option == 3){
  40. Option_3 Optionthree = new Option_3();
  41. Optionthree.Exit();
  42.  
  43. }else{
  44. System.out.println("You did not enter 1, 2 or 3");
  45. }else{
  46. System.out.println("The Pin You Entered Was Wrong");
  47.  
  48.  
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement