package PROJECT_ATM;
import java.sql.SQLOutput;
import java.util.*;
public class Project_1 {
// static String insert;
// static int accType;
// static int totalAmount = 20000;
static Scanner sc = new Scanner(System.in);
static int entAmount = sc.nextInt();
public static void main(String[] args) {
System.out.println(" WEL-COME TO BOM ");
System.out.println(" PLEASE INSERT YOUR CARD");
Scanner sc = new Scanner(System.in);
String insert = sc.nextLine();
if (insert.contentEquals("YES")) {
System.out.println(" PLEASE WAIT WHILE YOUR TRANSACTION IS
PROCESSING");
System.out.println("DO NOT REMOVE CARD");
} else {
System.out.println(" PLEASE TRY AGAIN");
System.out.println(" YOUR PIN IS WRONG");
}}
}/*
while ((insert.contentEquals("YES"))) {
System.out.println("***** SERVICES *****");
System.out.println("1. WITHDRAW");
System.out.println("2. BALANCE CHECK");
System.out.println("3. NEW USER");
System.out.println("4. FORGET PASSWORD");
System.out.println("**** *****");
break;
}
}
System.out.println(" please Wait");
System.out.println(" enter service num");
int accType = sc.nextInt();
if (accType == 1) {
String acc = "SAVING";
}
if (accType == 2) {
String acc = "CURRENT";
}
if (accType == 3) {
String acc = "Change password"
}
if (accType == 4) {
String acc = "new user";
}
}
IF (insert.equals("YES")){
System.out.println(" PLEASE WAIT WHILE YOUR TRANSACTION IS
PROCESSING");
System.out.println("DO NOT REMOVE CARD");}
int pin = sc.nextInt();
if(pin == 0000){
System.out.println(" PASSWORD IS ACCEPTED ");
}
else{
System.out.println(" PLEASE TRY AGAIN");
System.out.println(" YOUR PIN IS WRONG");
if (accType == 1) {
System.out.println(" enter amount for withdraw");
int entAmount = sc.nextInt();
if (entAmount > totalAmount) {
System.out.println(" INSUFFICIENT BALANCE");}
if (entAmount < totalAmount) {
System.out.println("*** PROCESSING***");
totalAmount = (totalAmount-entAmount);
System.out.println(entAmount+"AMOUNT HAS BEEN DEBITED FROM
YOUR ACCOUNT ******133");
System.out.println("YOUR CURRENT BALANCE IS");
System.out.println(totalAmount);
}
}
if (accType == 2) {
System.out.println(" enter amount for withdraw");
int entAmount = sc.nextInt();
if (entAmount < totalAmount) {
System.out.println(" INSUFFICIENT BALANCE");}
if (entAmount < totalAmount) {
System.out.println("*** PROCESSING***");
totalAmount = totalAmount - entAmount;
System.out.println(totalAmount);
}
}
if (accType == 1 && accType <= totalAmount) {
System.out.println(" enter amount for withdraw");
System.out.println(entAmount + "AMOUNT HAS BEEN DEBITED FROM YOUR
ACCOUNT ******133");
System.out.println("YOUR CURRENT BALANCE IS");
System.out.println(totalAmount);
}
if (accType == 1 && accType >= totalAmount) {
System.out.println(" INSUFFICIENT BALANCE");
}
if (accType == 2 && accType <= totalAmount) {
System.out.println(" enter amount for withdraw");
System.out.println(entAmount + "AMOUNT HAS BEEN DEBITED FROM YOUR
ACCOUNT ******133");
System.out.println("YOUR CURRENT BALANCE IS");
System.out.println(totalAmount);
}
if (accType == 2 && accType >= totalAmount) {
System.out.println(" INSUFFICIENT BALANCE")
}
}
}*/