Java Program For Banking Management System: Learn More
Java Program For Banking Management System: Learn More
Learn more
Got it!
Home
Coding problems
DS & Algo. ▾
Languages ▾
Web. ▾
Programs ▾
Aptitude ▾
Interview ▾
CS Subjects ▾
More ▾
1. Display All
2. Search By Account
3. Deposit
4. Withdrawal
5. Exit
Initially, we will add some (N) customers to the bank and then we can display all account details
using menu 1), menu 2) is used to search the bank account, menu 3) is used to deposit money in
particular account, menu 4) is used to manager withdrawal and menu 5) is used to exit from the
program.
Program
import java.util.Scanner;
class Bank
{
private String accno;
private String name;
private long balance;
class ExBank
{
public static void main(String arg[])
{
Scanner KB=new Scanner(System.in);
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("Search
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("Search
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("Search
Failed..Account Not Exist..");
}
break;
case 5:
System.out.println("Good Bye..");
break;
}
}
while(ch!=5);
}
}
Output
Main Menu
1.Display All
2.Search By Account
3.Deposit
4.Withdrawal
5.Exit
Ur Choice :
1
101,Chintu,25000
102,Alexander,30000
Main Menu
1.Display All
2.Search By Account
3.Deposit
4.Withdrawal
5.Exit
Ur Choice :
2
Main Menu
1.Display All
2.Search By Account
3.Deposit
4.Withdrawal
5.Exit
Ur Choice :
2
Main Menu
1.Display All
2.Search By Account
3.Deposit
4.Withdrawal
5.Exit
Ur Choice :
3
Main Menu
1.Display All
2.Search By Account
3.Deposit
4.Withdrawal
5.Exit
Ur Choice :
3
Main Menu
1.Display All
2.Search By Account
3.Deposit
4.Withdrawal
5.Exit
Ur Choice :
4
Main Menu
1.Display All
2.Search By Account
3.Deposit
4.Withdrawal
5.Exit
Ur Choice :
4
Main Menu
1.Display All
2.Search By Account
3.Deposit
4.Withdrawal
5.Exit
Ur Choice :
5
Good Bye..
Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web
programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates
ABOUT SECTION
» About us
» Contact us
» Feedback
» Privacy policy
STUDENT'S SECTION
» Internship
» Certificates
» Content Writers of the Month
SUBSCRIBE
» Facebook
» LinkedIn
» Subscribe through email