JAVA REPORT FINAL (1)
JAVA REPORT FINAL (1)
This Micro Project Report Entitled “ Mini Bank system for handling
Deposits and withdraw ” By Mr. Yash Patil , Mr. Priyanshu Kannaujiya, Mr.
Sameer Jadhav Is Approved For the Diploma of AIML Engineering (Diploma)
(Second Year) For Academic Year 2022 - 2023.
Examiners
1.
2.
Supervisor
1.
Date:
Place:
ACKNOWLEDGEMENT
1. Abstract 5
2. Introduction 6
3. Aim 7
4. Scope of work 8
7. Conclusion 16
ABSTRACT
• Account Holder List- This is a feature for the admin. The admin
can view the list of all the account holders.
• Balance Enquiry- The customer can check their balance via this
application.
• Closing- The customer can close their accounts too using this
application.
PROJECT IMPLEMENTATION
CODE:
import java.util.Scanner;
class Bank {
private String accno;
private String name;
private long balance;
Scanner KB = new
Scanner(System.in);
//method to open an account
void openAccount() {
System.out.print("Enter Account
No: ");
accno = KB.next();
System.out.print("Enter Name: ");
name = KB.next();
System.out.print("Enter Balance:
");
balance = KB.nextLong();
}
//method to display account details
void showAccount() {
System.out.println(accno + "," +
name + "," + balance);
}
//method to deposit money
void deposit() {
long amt;
System.out.println("Enter
Amount U Want to Deposit : ");
amt = KB.nextLong();
balance = balance + amt;
}
//method to withdraw money
void withdrawal() {
long amt;
System.out.println("Enter
Amount U Want to withdraw : ");
amt = KB.nextLong();
if (balance >= amt) {
balance = balance - amt;
} else {
System.out.println("Less
Balance..Transaction Failed..");
}
}
//method to search an account
number
boolean search(String acn
{
if (accno.equals(acn)) {
showAccount();
return (true);
}
return (false);
}
}
public class ExBank {
public static void main(String arg[])
{
Scanner KB = new
Scanner(System.in);
//create initial accounts
System.out.print("How Many
Customer U Want to Input : ");
int n = KB.nextInt();
Bank C[] = new Bank[n];
for (int i = 0; i < C.length; i++) {
C[i] = new Bank();
C[i].openAccount();
}
//run loop until menu 5 is not
pressed
int ch;
do
{
System.out.println("Main
Menu\n1. Display All\n 2. Search By
Account\n 3. Deposit\n 4.
Withdrawal\n 5.E xit ");
System.out.println("Ur
Choice :"); ch = KB.nextInt();
switch (ch) {
case 1:
for (int i = 0; i <
C.length; i++) {
C[i].showAccount();
}
break;
case 2:
System.out.print("Enter
Account No U Want to Search...: ");
String acn = KB.next();
boolean found = false;
for (int i = 0; i <
C.length; i++) {
found =
C[i].search(acn);
if (found) {
break;
}
}
if (!found) {
System.out.println("S
earch Failed..Account Not Exist..");
}
break;
case 3:
System.out.print("Enter
Account No : ");
acn = KB.next();
found = false;
for (int i = 0; i <
C.length; i++) {
found =
C[i].search(acn);
if (found) {
C[i].deposit();
break;
}
}
if (!found) {
System.out.println("S
earch Failed..Account Not Exist..");
}
break;
case 4:
System.out.print("Enter
Account No : ");
acn = KB.next();
found = false;
for (int i = 0; i <
C.length; i++) {
found =
C[i].search(acn);
if (found) {
C[i].withdrawal();
break;
}
}
if (!found) {
System.out.println("S
earch Failed..Account Not Exist..");
}
break;
case 5:
System.out.println("Go
od Bye..");
break;
}
}
while (ch != 5);
}
}
• ADVANTAGES AND DISADVANTAGES
Advantages :
• Convenience
• Faster Service
• 24x7 Facility
• Quality Service
Disadvantages :
• Insecurity
• High Star-up cost
• Lack of Personal contact
• Transaction Problem
CONCLUSION