0% found this document useful (0 votes)
39 views

Project

The document describes a Banking Management System project that allows customers to create accounts, deposit and withdraw money, check balances, and view account reports. The project uses Java and has modules for registration, login/logout, core banking operations, profile management, and generating reports. The source code provided implements classes for banks and accounts, and includes methods for opening accounts, deposits, withdrawals, balance inquiries, and displaying all accounts.

Uploaded by

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

Project

The document describes a Banking Management System project that allows customers to create accounts, deposit and withdraw money, check balances, and view account reports. The project uses Java and has modules for registration, login/logout, core banking operations, profile management, and generating reports. The source code provided implements classes for banks and accounts, and includes methods for opening accounts, deposits, withdrawals, balance inquiries, and displaying all accounts.

Uploaded by

pabansaha2657
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

COMPUTER

PROJECT
SYNOPSIS

TOPIC: Banking Management System

NAME : PABAN SAHA


CLASS : XI
SECTION: B
ROLL NO : 15
Project-1 - Banking Management System

The Banking Management System is an application for maintaining a person's


account in a bank. The system provides the access to the customer to create an
account, deposit/withdraw the cash and other core banking features from his
account. It also enables customer to view reports of all accounts.
Project Modules
Registration: A customer can create an account in the bank by providing
important information such as personal details
• Login/Logout: As any secure internet, facing financial solution, login and
logout will be provided by banking management system
• Core Operations: This module enables Deposit or withdraws functionality to
the customer. User can also check the balance
• Reports: Module generates different kind of statements and used for
checking balance
• Profile Management: User can update his details like contact information etc.

SOURCE CODE:-

import java.util.Scanner;

public class Bank


{
public final int TOTAL_ACCTS_LIMIT = 10;
public Account[] accts;
public int acCount;
public Bank() {
accts = new Account[TOTAL_ACCTS_LIMIT];
acCount = 0;
}

private Account getAccount(long accNo) {


Account acct = null;
for (int i = 0; i < acCount; i++) {
if (accts[i].getAcNo() == accNo) {
acct = accts[i];
break;
}
}
return acct;
}

public void openAccount() {


if (acCount == TOTAL_ACCTS_LIMIT) {
System.out.println("Limit reached, can't create more than " +
TOTAL_ACCTS_LIMIT + " accounts");
return;
}

Scanner in = new Scanner(System.in);


System.out.println("Enter Account Number: ");
long acNum = in.nextLong();
in.nextLine();
System.out.println("Enter Account Holder Name: ");
String name = in.nextLine();
System.out.println("Enter Account Type (Savings(S)/Current(C)): ");
char type = in.next().charAt(0);
System.out.println("Enter Account Balance: ");
double bal = in.nextDouble();
accts[acCount++] = new Account(acNum, name, type, bal);
System.out.println("Account Opened Successfully\n");
}

public void balanceEnquiry() {

Scanner in = new Scanner(System.in);


System.out.println("Enter Account Number: ");
long acNum = in.nextLong();
Account acct = getAccount(acNum);

if (acct == null) {
System.out.println("Sorry, Account not found\n");
}
else {
acct.displayAcDetails();
}

System.out.println();
}

public void makeDeposit() {

Scanner in = new Scanner(System.in);


System.out.println("Enter Account Number: ");
long acNum = in.nextLong();
System.out.println("Enter Amount: ");
double amt = in.nextDouble();
Account acct = getAccount(acNum);

if (acct == null) {
System.out.println("Sorry, Account not found");
}
else {
acct.deposit(amt);
System.out.println("Deposit Successful");
System.out.println("Updated Account Details");
acct.displayAcDetails();
}

System.out.println();
}

public void makeWithdrawal() {

Scanner in = new Scanner(System.in);


System.out.println("Enter Account Number: ");
long acNum = in.nextLong();
System.out.println("Enter Amount: ");
double amt = in.nextDouble();
Account acct = getAccount(acNum);

if (acct == null) {
System.out.println("Sorry, Account not found");
}
else {
if (acct.withdraw(amt)) {
System.out.println("Withdrawal Successful");
System.out.println("Updated Account Details");
}
else {
System.out.println("Insufficient Balance!!!");
System.out.println("Account Details");
}
acct.displayAcDetails();
}

System.out.println();
}

public void displayAllAccounts() {


System.out.println("A/C No.\tNAME\tTYPE\tBALANCE");
for (int i = 0; i < acCount; i++) {
System.out.println(accts[i].getAcNo() + "\t"
+ accts[i].getAcHolder() + "\t" + accts[i].getAcType() + "\t"
+ accts[i].getAcBal());
}
System.out.println();
}

public static void main(String args[]) {


int ch;
Bank bank = new Bank();
do {
System.out.println("Main Menu");
System.out.println("1. Open New Account");
System.out.println("2. Deposit Amount");
System.out.println("3. Withdraw Amount");
System.out.println("4. Check Balance");
System.out.println("5. List All Accounts");
System.out.println("6. Exit");
System.out.println("Make Your Choice (1-6): ");

Scanner in = new Scanner(System.in);


ch = in.nextInt();
System.out.println();

switch(ch) {
case 1:
bank.openAccount();
break;

case 2:
bank.makeDeposit();
break;

case 3:
bank.makeWithdrawal();
break;
case 4:
bank.balanceEnquiry();
break;

case 5:
bank.displayAllAccounts();
break;

case 6:
System.out.println("Bye...");
break;

default:
System.out.println("Incorrect choice!!!");
}
} while (ch != 6);
}
}

You might also like