Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
24 views

Computer Project

The source code defines variables to store account details for savings and current accounts. It contains methods to take input of account holder details like name, address, phone number etc. and also details of introducer. The input is stored in arrays. The code displays account number and takes choice of individual or joint account. For joint account, it takes additional details of second account holder.

Uploaded by

Shin chan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Computer Project

The source code defines variables to store account details for savings and current accounts. It contains methods to take input of account holder details like name, address, phone number etc. and also details of introducer. The input is stored in arrays. The code displays account number and takes choice of individual or joint account. For joint account, it takes additional details of second account holder.

Uploaded by

Shin chan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

EAST WEST MODEL SCHOOL

Project Name: Computer Applications Project

Name: Archishman Mitra


Class: X Section: A Roll No.: 8
UID No.:
PREFACE

The main objective of any Computer Applications student is to get


as much of practical knowledge as possible. Being able to get
practical knowledge by developing a project is a lifetime
experience. As practical knowledge is as important as theoretical
knowledge, I am thankful of having this project.

Through the development of the project, I had a great experience


of various strategies that can be applied in the development of
project.

I am pleased to present you this project. Proper care has been


taken while organizing the project, so that it is to comprehend.
ACKNOWLEDGEMENT

I would like to express my deep sense of gratitude to our Computer


Applications Teacher Mr. Prasenjit Ghosh for providing me all the
necessary information and helping us in gaining undividable practical
experience as well as dedicated guidance throughout the development of
the project.

I would also like to extend my gratitude to our Principal Mr. Tapas Kumar
Sinha and the school authority for providing me all the necessary items.

I would also like to thank my friends for all the thoughtful and mind
stimulating discussions we had, which prompted me to think beyond the
obvious.

I cannot end without thanking my lovely family, on whose


encouragement, support, and love, I could complete my project work.

I would like to thank to all those who directly or indirectly supported me


in carrying out this project work successfully.

Date: August 13, 2022 Name: Archishman Mitra


Class: X Sec: A
Table of Contents

Sl No. Topic Page


No.
1 Introduction 1
2 Source Code 2-23
3 Variable Description 24-25
4 Output 26
5 Signature Page
Introduction

A banking system functions as the heart and lifeblood of any


functioning economy. A banking system is the key to
economic growth and development. It is essential to
unlocking wealth, creating opportunities, providing jobs, and
facilitating commerce. It provides a mechanism for
individuals and businesses to participate in the global
economy. Importantly, banks, when they do their jobs
correctly, allow their customers to have a vested interest in
a strong and stable society.

1
Source Code
-->
import java.lang.*;

import java.util.*;

import java.time.*;

class Bank

static int a=0; //Store account number which is to be alloted

static String name_a[]; //Store name of account holder

static String addr_a[]; //Store address of account holder

static String lanmk_a[]; //Store landmark of account holder

static long phno_a[]; //Store phone number of account holder

static String name_b[]; //Store name of account holder

static String addr_b[]; //Store address of account holder

static String lanmk_b[]; //Store landmark of account holder

static long phno_b[]; //Store phone number of account holder

static String name2_a[]; //Store name of 2nd account holder

static String addr2_a[]; //Store address of 2nd account


holder

static String lanmk2_a[]; //Store landmark of 2nd account


holder

static long phno2_a[]; //Store phone number of 2nd account


holder

static String name2_b[]; //Store name of 2nd account holder

static String addr2_b[]; //Store address of 2nd account


holder

static String lanmk2_b[]; //Store landmark of 2nd account


holder

static long phno2_b[]; //Store phone number of 2nd account


holder

2
static String intro_a[]; //Store name of introducer

static int acno_intro_a[]; //Store account number of


introducer

static long amt_a[]; //Store the amount with which the


account is to be opened

static String intro_b[]; //Store name of introducer

static int acno_intro_b[]; //Store account number of


introducer

static long amt_b[]; //Store the amount with which the


account is to be opened

static char op_a[]; //Store bank operation (Joint or


Individual)

static char op_b[]; //Store bank operation (Joint or


Individual)

static char jch_a[]; //Store the choice if the account will


be joint account or not

static char jch_b[]; //Store the choice if the account will


be joint account or not

/**Open a new account

*/

public static void inputData()

Scanner sc=new Scanner(System.in);

System.out.println("(a) Savings Account\t(b) Current


Account");

System.out.print("Enter your choice: ");

char ch=sc.next().charAt(0);

a=a+1;

int i=a-1;

switch(ch)

case 'a':

3
name_a=new String[1000];

addr_a=new String[1000];

lanmk_a=new String[1000];

phno_a=new long[1000];

System.out.println("Please enter the details:");

String fal=sc.nextLine(); //#Prevent the


skipping of the line due to a bug which has been described in the
README.txt

System.out.print("Enter Name of Account Holder: ");

name_a[i]=sc.nextLine();

System.out.print("Enter the Address: ");

addr_a[i]=sc.nextLine();

System.out.print("Enter the Landmark: ");

lanmk_a[i]=sc.nextLine();

System.out.print("Enter the Phone Number: ");

phno_a[i]=sc.nextLong();

jch_a=new char[1000];

System.out.println("Press 'y' for joint account and


'n' for individual account");

jch_a[i]=sc.next().charAt(0);

name2_a=new String[1000];

addr2_a=new String[1000];

lanmk2_a=new String[1000];

phno2_a=new long[1000];

op_a=new char[1000];

if(jch_a[i]=='y')

System.out.println("Please enter the details:");

4
fal=sc.nextLine(); //#Prevent the
skipping of the line due to a bug which has been described in the
README.txt

System.out.print("Enter Name of 2nd Account


Holder: ");

name2_a[i]=sc.nextLine();

System.out.print("Enter the Address: ");

addr2_a[i]=sc.nextLine();

System.out.print("Enter the Landmark: ");

lanmk2_a[i]=sc.nextLine();

System.out.print("Enter the Phone Number: ");

phno2_a[i]=sc.nextLong();

System.out.println("Bank Operation:\n(a) Joint


(b) Individual");

op_a[i]=sc.next().charAt(0);

fal=sc.nextLine(); //#Prevent the skipping of


the line due to a bug which has been described in the README.txt

intro_a=new String[1000];

acno_intro_a=new int[1000];

amt_a=new long[1000];

System.out.print("Enter the Name of the introducer:


");

intro_a[i]=sc.nextLine();

System.out.print("Enter the Account Number of


introducer: ");

acno_intro_a[i]=sc.nextInt();

System.out.print("Enter the Amount to open the


account with: Rs. ");

amt_a[i]=sc.nextLong();

System.out.println("Your Account number is: "+a);

break;

5
case 'b':

phno_b=new long[1000];

name_b=new String[1000];

System.out.println("Please enter the details:");

fal=sc.nextLine(); //#Prevent the skipping of


the line due to a bug which has been described in the README.txt

System.out.print("Enter Name of Account Holder: ");

name_b[i]=sc.nextLine();

addr_b=new String[1000];

System.out.print("Enter the Address: ");

addr_b[i]=sc.nextLine();

lanmk_b=new String[1000];

System.out.print("Enter the landmark: ");

lanmk_b[i]=sc.nextLine();

System.out.print("Enter the Phone Number: ");

phno_b[i]=sc.nextLong();

jch_b=new char[1000];

System.out.println("Press 'y' for joint account and


'n' for individual account");

jch_b[i]=sc.next().charAt(0);

name2_b=new String[1000];

addr2_b=new String[1000];

lanmk2_b=new String[1000];

phno2_b=new long[1000];

op_b=new char[1000];

if(jch_b[i]=='y')

System.out.println("Please enter the details of


the 2nd Account Holder:");

6
fal=sc.nextLine(); //#Prevent the
skipping of the line due to a bug which has been described in the
README.txt

System.out.print("Enter Name of 2nd Account


Holder: ");

name2_b[i]=sc.nextLine();

System.out.print("Enter the Address: ");

addr2_b[i]=sc.nextLine();

System.out.print("Enter the Landmark: ");

lanmk2_b[i]=sc.nextLine();

System.out.print("Enter the Phone Number: ");

phno2_b[i]=sc.nextLong();

System.out.println("Bank Operation:\n(a) Joint


(b) Individual");

op_b[i]=sc.next().charAt(0);

fal=sc.nextLine(); //#Prevent the skipping of


the line due to a bug which has been described in the README.txt

intro_b=new String[1000];

acno_intro_b=new int[1000];

amt_b=new long[1000];

System.out.print("Enter the Name of the introducer:


");

intro_b[i]=sc.nextLine();

System.out.print("Enter the Account Number of


introducer: ");

acno_intro_b[i]=sc.nextInt();

System.out.print("Enter the Amount to open the


account with: Rs. ");

amt_b[i]=sc.nextLong();

System.out.println("Your Account number is: "+a);

break;

7
default:

System.out.println("Invalid choice!");

/**Print account summary

*/

public static void printSummary()

Scanner sc=new Scanner(System.in);

System.out.println("(a) Savings Account\t(b) Current


Account");

System.out.print("Enter your choice: ");

char ch=sc.next().charAt(0);

int i;

switch(ch)

case 'a':

System.out.print("Enter the Account Number: ");

i=sc.nextInt();

System.out.println("Name of Account Holder:


"+name_a[i-1]);

System.out.println("Address: "+addr_a[i-1]);

System.out.println("Landmark: "+lanmk_a[i-1]);

System.out.println("Phone Number: "+phno_a[i-1]);

if(jch_a[i-1]=='y')

System.out.println("Account type: Joint");

System.out.println("Name of 2nd Account Holder:


"+name2_a[i-1]);

8
System.out.println("Address: "+addr2_a[i-1]);

System.out.println("Landmark: "+lanmk2_a[i-1]);

System.out.println("Phone Number: "+phno2_a[i-


1]);

switch(op_a[i-1])

case 'a':

System.out.println("Bank operation:
Joint");

break;

case 'b':

System.out.println("Bank operation:
Individual");

break;

else

System.out.println("Account type: Individual");

System.out.println("Name of introducer: "+intro_a[i-


1]);

System.out.println("Account Number of introducer:


"+acno_intro_a[i-1]);

System.out.println("Account Balance: "+amt_a[i-1]);

break;

case 'b':

System.out.print("Enter the Account Number: ");

i=sc.nextInt();

System.out.println("Name of Account Holder:


"+name_b[i-1]);

9
System.out.println("Address: "+addr_b[i-1]);

System.out.println("Landmark: "+lanmk_b[i-1]);

System.out.println("Phone Number: "+phno_b[i-1]);

if(jch_b[i-1]=='y')

System.out.println("Account type: Joint");

System.out.println("Name of 2nd Account Holder:


"+name2_b[i-1]);

System.out.println("Address: "+addr2_b[i-1]);

System.out.println("Landmark: "+lanmk2_b[i-1]);

System.out.println("Phone Number: "+phno2_b[i-


1]);

switch(op_b[i-1])

case 'a':

System.out.println("Bank operation:
Joint");

break;

case 'b':

System.out.println("Bank operation:
Individual");

break;

else

System.out.println("Account type: Individual");

System.out.println("Name of introducer: "+intro_b[i-


1]);

10
System.out.println("Account Number of introducer:
"+acno_intro_b[i-1]);

System.out.println("Account Balance: "+amt_b[i-1]);

break;

default:

System.out.println("Invalid choice!");

/**Deposit money to the account

*/

public static void deposit()

Scanner sc=new Scanner(System.in);

System.out.println("(a) Savings Account\t(b) Current


Account");

System.out.print("Enter your choice: ");

char ch=sc.next().charAt(0);

int i;

switch(ch)

case 'a':

System.out.print("Enter the Account Number: ");

i=sc.nextInt();

System.out.print("Enter money to be deposited: Rs.


");

long depo_a=sc.nextLong();

amt_a[i-1]=amt_a[i-1]+depo_a;

System.out.println("Rs. "+depo_a+" has been Deposited


in account number "+i);

11
System.out.println("Account Balance: "+amt_a[i-1]);

break;

case 'b':

System.out.print("Enter the Account Number: ");

i=sc.nextInt();

System.out.print("Enter money to be deposited: Rs.


");

long depo_b=sc.nextLong();

amt_b[i-1]=amt_b[i-1]+depo_b;

System.out.println("Rs. "+depo_b+" has been deposited


in account number "+i);

System.out.println("Account Balance: "+amt_b[i-1]);

break;

default:

System.out.println("Invalid choice!");

/**Withdraw money from account

*/

public static void withdraw()

Scanner sc=new Scanner(System.in);

System.out.println("(a) Savings Account\t(b) Current


Account");

System.out.print("Enter your choice: ");

char ch=sc.next().charAt(0);

int i;

switch(ch)

12
case 'a':

System.out.print("Enter the Account Number: ");

i=sc.nextInt();

System.out.print("Enter money to be withdrawn: Rs.


");

long with_a=sc.nextLong();

if(with_a<=amt_a[i-1])

amt_a[i-1]=amt_a[i-1]-with_a;

System.out.println("Rs. "+with_a+" has been


withdrawn from account number"+i);

System.out.println("Account Balance: "+amt_a[i-


1]);

else

System.out.println("Withdraw Unsuccessful!");

System.out.println("Insufficient funds in your


Bank Account");

break;

case 'b':

System.out.print("Enter the Account Number: ");

i=sc.nextInt();

System.out.print("Enter money to be withdrawn: Rs.


");

long with_b=sc.nextLong();

if(with_b<=amt_b[i-1])

amt_b[i-1]=amt_b[i-1]-with_b;

13
System.out.println("Rs. "+with_b+" has been
withdrawn from account number"+i);

System.out.println("Account Balance: "+amt_b[i-


1]);

else

System.out.println("Withdraw Unsuccessful!");

System.out.println("Insufficient funds in your


Bank Account");

break;

default:

System.out.println("Invalid choice!");

/**Make a fixed deposit account

*/

public static void fixedDeposit()

Scanner sc=new Scanner(System.in);

int a=0;

a=a+1;

int i=a-1;

int acno_depo[]=new int[1000];

int acno_fixdepo[]=new int[1000];

acno_fixdepo[i]=a;

String name_fixdepo[]=new String[1000];

String addr_fixdepo[]=new String[1000];

14
long phno_fixdepo[]=new long[1000];

long amt_fixdepo[]=new long[1000];

int duration[]=new int[1000];

double mat_amt[]=new double[1000];

System.out.println("Please enter the details:");

System.out.print("Enter Name of Account Holder: ");

name_fixdepo[i]=sc.nextLine();

System.out.print("Enter the Address: ");

addr_fixdepo[i]=sc.nextLine();

System.out.print("Enter the Phone Number: ");

phno_fixdepo[i]=sc.nextLong();

System.out.print("Enter the Account Number: ");

acno_depo[i]=sc.nextInt();

System.out.print("Enter the Amount for Fixed Deposit: Rs. ");

amt_fixdepo[i]=sc.nextLong();

System.out.print("Enter the Time Period of the Fixed Deposit


account (in years): ");

duration[i]=sc.nextInt();

int compound[]=new int[1000];

compound[i]=duration[i]*2;

mat_amt[i]=Math.rint(amt_fixdepo[i]*Math.pow((1+(0.05/2)),compound[i]
));

System.out.println("Name of Account Holder:


"+name_fixdepo[i]);

System.out.println("Address of Account Holder:


"+addr_fixdepo[i]);

System.out.println("Phone Number of Account Holder:


"+phno_fixdepo[i]);

System.out.println("Rate of interest: 5%");

System.out.println("Interest compunded: Half-Yearly");

15
System.out.println("Account number of Fixed Deposit account:
"+acno_fixdepo[i]);

System.out.println("Amount Deposited: Rs. "+amt_fixdepo[i]);

System.out.println("Time Period: "+duration[i]+" years");

System.out.println("Maturity Amount: Rs. "+mat_amt[i]); }

/**Modify account information

*/

public static void modifyData()

Scanner sc=new Scanner(System.in);

System.out.println("(a) Savings Account\t(b) Current


Account");

System.out.print("Enter your choice: ");

char ch=sc.next().charAt(0);

int i;

switch(ch)

case 'a':

System.out.print("Enter the Account Number: ");

i=sc.nextInt();

System.out.println("Enter the new details: ");

String fal=sc.nextLine(); //#Prevent the


skipping of the line due to a bug which has been described in the
README.txt

System.out.print("Enter Name of Account Holder: ");

name_a[i-1]=sc.nextLine();

System.out.print("Enter the Address: ");

addr_a[i-1]=sc.nextLine();

System.out.print("Enter the landmark: ");

16
lanmk_a[i-1]=sc.nextLine();

System.out.print("Enter the Phone Number: ");

phno_a[i-1]=sc.nextLong();

System.out.println("Press 'y' for joint account and


'n' for individual account");

jch_a[i-1]=sc.next().charAt(0);

if(jch_a[i-1]=='y')

System.out.println("Please enter the details of


the 2nd Account Holder:");

fal=sc.nextLine(); //#Prevent the


skipping of the line due to a bug which has been described in the
README.txt

System.out.print("Enter Name of 2nd Account


Holder: ");

name2_a[i-1]=sc.nextLine();

System.out.print("Enter the Address: ");

addr2_a[i-1]=sc.nextLine();

System.out.print("Enter the Landmark: ");

lanmk2_a[i-1]=sc.nextLine();

System.out.print("Enter the Phone Number: ");

phno2_a[i-1]=sc.nextLong();

System.out.println("Bank Operation:\n(a) Joint


(b) Individual");

op_a[i-1]=sc.next().charAt(0);

fal=sc.nextLine(); //#Prevent the skipping of


the line due to a bug which has been described in the README.txt

System.out.print("Enter the Name of the introducer:


");

intro_a[i-1]=sc.nextLine();

17
System.out.print("Enter the Account Number of
introducer: ");

acno_intro_a[i-1]=sc.nextInt();

System.out.println("Account Information Modified


Successfully!");

System.out.println("Bank Details of Account Number


"+i+" has been modified. ");

break;

case 'b':

System.out.print("Enter the Account Number: ");

i=sc.nextInt();

System.out.println("Enter the new details: ");

System.out.print("Enter Name of Account Holder: ");

name_b[i-1]=sc.nextLine();

System.out.print("Enter the Address: ");

addr_b[i-1]=sc.nextLine();

System.out.print("Enter the landmark: ");

lanmk_b[i-1]=sc.nextLine();

System.out.print("Enter the Phone Number: ");

phno_b[i-1]=sc.nextLong();

System.out.println("Press 'y' for joint account and


'n' for individual account");

jch_b[i-1]=sc.next().charAt(0);

if(jch_b[i]=='y')

System.out.println("Please enter the details of


the 2nd Account Holder:");

System.out.print("Enter Name of 2nd Account


Holder: ");

name2_b[i-1]=sc.nextLine();

System.out.print("Enter the Address: ");

18
addr2_b[i-1]=sc.nextLine();

System.out.print("Enter the Landmark: ");

lanmk2_b[i-1]=sc.nextLine();

System.out.print("Enter the Phone Number: ");

phno2_b[i-1]=sc.nextLong();

System.out.println("Bank Operation:\n(a) Joint


(b) Individual");

op_b[i-1]=sc.next().charAt(0);

System.out.print("Enter the Name of the introducer:


");

intro_b[i-1]=sc.nextLine();

System.out.print("Enter the Account Number of


introducer: ");

acno_intro_b[i-1]=sc.nextInt();

System.out.println("Account Information Modified


Successfully!");

System.out.println("Bank Details of Account Number


"+i+" has been modified.");

break;

default:

System.out.println("Invalid choice!");

/**Delete account information

*/

public static void deleteData()

Scanner sc=new Scanner(System.in);

19
System.out.println("(a) Savings Account\t(b) Current
Account");

System.out.print("Enter your choice: ");

char ch=sc.next().charAt(0);

int i;

switch(ch)

case 'a':

System.out.print("Enter the Account Number: ");

i=sc.nextInt();

name_a[i-1]=null;

addr_a[i-1]=null;

lanmk_a[i-1]=null;

phno_a[i-1]=0;

name2_a[i-1]=null;

addr2_a[i-1]=null;

lanmk2_a[i-1]=null;

phno2_a[i-1]=0;

intro_a[i-1]=null;

acno_intro_a[i-1]=0;

amt_a[i-1]=0;

op_a[i-1]=' ';

jch_a[i-1]=' ';

System.out.println("Account Information Deleted


Successfully!");

System.out.println("Bank Details of Account Number


"+i+" has been deleted.");

break;

case 'b':

System.out.print("Enter the Account Number: ");

20
i=sc.nextInt();

name_b[i-1]=null;

addr_b[i-1]=null;

lanmk_b[i-1]=null;

phno_b[i-1]=0;

name2_b[i-1]=null;

addr2_b[i-1]=null;

lanmk2_b[i-1]=null;

phno2_b[i-1]=0;

intro_b[i-1]=null;

acno_intro_b[i-1]=0;

amt_b[i-1]=0;

op_b[i-1]='\u0000';

jch_b[i-1]='\u0000';

System.out.println("Account Information Deleted


Successfully!");

System.out.println("Bank Details of Account Number


"+i+" has been deleted.");

break;

default:

System.out.println("Invalid choice!");

/**Call the appropriate function

*/

public static void main(String args[])

Scanner sc=new Scanner(System.in);

21
char ch=' ';

do

System.out.println("a. Open Account\nb. Print Account


Summary\nc. Deposit\nd. Withdraw\ne. Make Fixed Deposit\nf. Modify
Account Information\ng. Delete Account Information\nh. Quit");

System.out.print("Enter your choice: ");

char ch1= sc.next().charAt(0);

switch(ch1)

case 'a':

inputData(); //Make a new account

break;

case 'b':

printSummary(); //Print account summary

break;

case 'c':

deposit(); //Deposit amount

break;

case 'd':

withdraw(); //Withdraw amount

break;

case 'e':

fixedDeposit(); //Make a fixed deposit

break;

case 'f':

modifyData(); //Modify account information

break;

case 'g':

22
deleteData(); //Delete account information

break;

case 'h':

System.exit(0); //Terminate the program

default:

System.out.println("Invalid choice!");

ch=ch1;

while(ch!='h');

23
Variable Description

Variable Data Type Description


a Int Allot account number to account holder.
name_a String Store the name of account holder.
addr_a String Store the address of account holder.
lanmk_a String Store the landmark of the account holder.
phno_a Long Store the phone number of account holder.
name2_a String Store the name of 2nd account holder.
addr2_a String Store the address of 2nd account holder.
lanmk2_a String Store the landmark of 2nd account holder.
phno2_a Long Store the phone number of 2nd account
holder.
name_b String Store the name of account holder.
addr_b String Store the address of account holder.
lanmk_b String Store the landmark of the account holder.
phno_b Long Store the phone number of account holder.
name2_b String Store the name of 2nd account holder.
addr2_b String Store the address of 2nd account holder.
lanmk2_b String Store the landmark of 2nd account holder.
phno2_b Long Store the phone number of 2nd account
holder.
intro_a String Store the name of introducer.
acno_intro_a Int Store the account number of introducer.
intro_b String Store the name of introducer.
acno_intro_b Int Store the account number of introducer.
amt_a Long Store the account balance.

24
amt_b Long Store the account balance.
jch_a Char Store the choice of account type.
jch_b Char Store the choice of account type.
op_a Char Store the choice of account operation.
op_b Char Store the choice of account operation.
depo_a Long Store the amount to be deposited in
account.
depo_b Long Store the amount to be deposited in
account.
with_a Long Store the amount to be withdrawn from
account.
with_b Long Store the amount to be withdrawn from
account.
acno_depo Int Store account number of main account.
acno_fixdepo Int Allot the account number to fixed deposit
account.
name_fixdepo String Store the name for fixed deposit account.
addr_fixdepo String Store the address for fixed deposit account.
phno_fixdepo Long Store the phone number for fixed deposit
account.
amt_fixdepo Long Store the amount to be deposited in fixed
deposit account.
duration Int Store the time period of fixed deposit
account.
mat_amt Double Calculate and store the maturity amount.
compound Int Store the number of the times interest is to
be compounded.
fal String Prevent the skipping of the line due to a
bug .
ch Char Check whether the user chooses ‘h’
ch1 Char Store the choice of user.

25
Output

26
Signature Page

Internal Examiner: -____________________

External Examiner: - ____________________

27

You might also like