Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- System.out.println("Welcome To Harry's Bank");
- //Pin System
- System.out.println("Please Enter Your Bank Pin.");
- Scanner userInput = new Scanner (System.in);
- int number;
- int password = 7123;
- int amount = 4000;
- number = userInput.nextInt();
- if (number == password) {
- System.out.println("Pin Accepted");
- System.out.println("You Have Now Entered Harry's Bank!");
- System.out.println("Press The Number Of The Option You Would Like.");
- System.out.println("1.Withdraw Money.");
- System.out.println("2.Put In Money");
- System.out.println("3.Exit Bank");
- Scanner Options = new Scanner (System.in);
- int option;
- option = userInput.nextInt();
- }
- int option;
- if (option == 1){
- Option_1 Optionone = new Option_1();
- Optionone.Withdraw();
- }
- if (option == 2){
- Option_2 Optiontwo = new Option_2();
- Optiontwo.Deposit();
- }
- if (option == 3){
- Option_3 Optionthree = new Option_3();
- Optionthree.Exit();
- }else{
- System.out.println("You did not enter 1, 2 or 3");
- }else{
- System.out.println("The Pin You Entered Was Wrong");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement