Professional Documents
Culture Documents
Atm
Atm
* ;
class atm
{
public void display() throws IOException
{
BufferedReader r = new BufferedReader(new
InputStreamReader(System.in));
System.out.println ("WELCOME TO EAST WEST BANK OF WORLD ");
BufferedReader r1 = new BufferedReader(new
InputStreamReader(System.in));
String a[]= new String[100];
int ac[]=new int[100];
int Bal[]=new int[100];
if(pos!=-1)
{
System.out.println("Your balance is :" + Bal[pos]+ "\nYou can deposit
or Withdrawal money : Press 1 for Deposit money and Press 2 for
Withdrawal money ");
if(c==1)
{
System.out.println("Please enter the amt you want to deposit ");
amt=Integer.parseInt(r.readLine());
Bal[pos]=Bal[pos]+amt;
}
else if (c==2)
{
System.out.println("Please enter the amt you want to withdrawal");
amt=Integer.parseInt(r1.readLine());
if((Bal[pos]-amt)>1000)
{
Bal[pos]=Bal[pos]-amt;
System.out.println(Bal[pos]);
}
else
/* input-output
* enter your name:-
* ankita chowdhury
*/