Вы находитесь на странице: 1из 18

ACKNOWLEDGEME

NT
This Project would not have been possible without the guidance and the help of several
individuals who in one way or another contributed and extended their valuable assistance in the
preparation and completion of this study.

First and foremost! " express utmost gratitude to our computer Teacher whose inputs and
encouragement has been my inspiration as " hurdle over the obstacles in the completion of this
project work."

i thank all the members of the family who had always a kind concern and consideration
regarding all my project and academic requirements.

Last but not least, i thank my classmates for all the co-operation and resources they extended to
me .
INDEX
SERIAL TOPIC PAGENO. TEACHERS REMARK
NO. SINGNATURE
1 INTRODUCTION 1
2 PROGRAMMING 2-7
3 SAMPLE OUTPUTS 8-
4 VARIABLE
DESCRIPTION
5 CONCLUSION
6 BIBILOGRAPHY
INTRODUCTION
Programming
import java.io.*;

import java.util.*;

class Account

String Name,Password;

int AccNo,Money;

int dd,mm,yy;

public Account(String n,int an,int d,int m,int y,int mon,String p)

Name=n;

AccNo=an;

dd=d;

mm=m;

yy=y;

Money=mon;

Password=p;

public void displayData()

{
System.out.println(AccNo+"\t"+Name+"\t\t"+dd+"/"+mm+"/"+yy+"\t"+Money+"\t
\t"+Password);

public class Bank

public static Calendar c=Calendar.getInstance();

public static int date=c.get(Calendar.DATE);

public static int month=c.get(Calendar.MONTH);

public static int year=c.get(Calendar.YEAR);

public static InputStreamReader isr=new InputStreamReader(System.in);

public static BufferedReader x=new BufferedReader(isr);

public static int Ano=1;

public static Account Acc[]=new Account[100];

public static void main() throws IOException

int ch=1;

startAccount();

do

System.out.println(" Welcome to State Bank ");


System.out.println(" --: OPTION MENU :-- ");

System.out.println(" 1. Create Account ");

System.out.println(" 2. Withdrawl ");

System.out.println(" 3. Deposited ");

System.out.println(" 4. Checking Account ");

System.out.println(" 5. Checking Master ");

System.out.println(" 6. Exit ");

System.out.print( "Enter Your Choice(1-6) : ");

ch=Integer.parseInt(x.readLine());

switch(ch)

case 1: createAccount(); break;

case 2: withdrawl(); break;

case 3: deposit(); break;

case 4: checkAccount(); break;

case 5: checkMaster(); break;

}while(ch<=5);

private static void createAccount() throws IOException

Calendar c=Calendar.getInstance();

int date=c.get(Calendar.DATE);
int month=c.get(Calendar.MONTH);

int year=c.get(Calendar.YEAR);

String n,p;

int m;

System.out.println("Your Account Number is : "+Ano);

System.out.print("Your Name : ");

n=x.readLine();

System.out.print("Opening Balance : ");

m=Integer.parseInt(x.readLine());

System.out.print("Your Password : ");

p=x.readLine();

Acc[Ano]=new Account(n,Ano,date,month,year,m,p);

Ano++;

private static void withdrawl() throws IOException

String p;

int no,amt;

System.out.print("Your Account Number : ");

no=Integer.parseInt(x.readLine());

System.out.print("Password : ");

p=x.readLine();

if(no<Ano && p.equals(Acc[no].Password))


{

System.out.println("Welcome "+Acc[no].Name);

System.out.print("Withdrawl Amount : ");

amt=Integer.parseInt(x.readLine());

if(amt<=Acc[no].Money)

Acc[no].Money-=amt;

else

System.out.println("Only "+Acc[no].Money+" amount left in your Account");

else

System.out.println("Your are Unauthorized Customer");

private static void deposit() throws IOException

String p;

int no,amt;

System.out.print("Your Account Number : ");

no=Integer.parseInt(x.readLine());

System.out.print("Password : ");

p=x.readLine();

if(no<Ano && p.equals(Acc[no].Password))

System.out.println("Welcome "+Acc[no].Name);
System.out.print("Deposit Amount : ");

amt=Integer.parseInt(x.readLine());

Acc[no].Money+=amt;

else

System.out.println("Your are Unauthorized Customer");

private static void checkAccount() throws IOException

String p;

int no,amt;

System.out.print("Your Account No. : ");

no=Integer.parseInt(x.readLine());

System.out.print("Password : ");

p=x.readLine();

if(no<Ano && p.equals(Acc[no].Password))

System.out.println("Your Name : "+Acc[no].Name);

System.out.println("Balance Amount : "+Acc[no].Money);

int rate=(Acc[no].Money>=20000)?18:10;

System.out.println("Interest Rate : "+rate+"%");

int interest=Acc[no].Money*rate/100;

System.out.println("Current Balance : "+(Acc[no].Money+interest));


}

else

System.out.println("Your are Unauthorized Customer");

private static void checkMaster()

System.out.println("Acc\tName\t\tDate\t\tMoney\t\tPassword");

for(int i=1;i<Ano;i++)

Acc[i].displayData();

private static void startAccount()

Acc[Ano]=new Account("Sachin",Ano,date,month,year,500,"ABC"); Ano++;

Acc[Ano]=new Account("Sourav",Ano,date,month,year,500,"XYZ"); Ano++;

Acc[Ano]=new Account("Shewag",Ano,date,month,year,500,"MNO"); Ano++;

}
SAMPLE OUTPUT

SAMPLE OUTPUT 1=> CREATE AN ACCOUNT


Sample output 2.1=> withdrawal of money from account
Sample output 3=>deposition of amount

Sample output 4=>checking the account


Sample output 5=> using the checking master

Variable description
Variable Data type uses
Name String To store name
Password String To store password
Acc no. Int Used to give the value of the account
Money Int To give use to give value to the programme
Dd Int To record date
Mm Int To record month
Ch int To give the value the interest

conclusion
this project has been a great tutor as far as practical aspects of programming are concerned .I
planned the programme with my classmates and discussed it with my teacher .After drafting the
source code i punched it in computer followed by debugging and testing it at both home and in
school .Subsequently i would able to get an error free code to put in my project .This has not
only drilled me on the subject

and taught me things like team work, time management ,research and presentation skills .these
are the lessons for my life which will always stay with my career

Bibliography
 COMPUTER APPLICATIONS CLASS 12 BY:SUMITRA
ARORA
 WORKING WITH BLUE J CLASS:-12TH BY, V.K.PANDEY

Вам также может понравиться