Project 1
Project 1
5
PROJECT 1: SEARCH BANK BY IFSC
-:Project Overview:-
About the Project: This java based console application takes an IFSC code from the user and
checks for the same ifsc code in RBI-IFSC.txt file which is actually a merged file of all ifsc codes
obtained from RBI September 2015 ifsc code list. If the ifsc code is found then it displays the
bank’s name , MICR code and address.
6
PROJECT 1: SEARCH BANK BY IFSC
-:Source code:-
import java.util.*;
import java.io.*;
public class searchBank{
public String input(){//inputs IFSC code
Scanner sc=new Scanner(System.in);
String ifsc=" ";
System.out.println("");
System.out.println("|-----------------------------------------|");
System.out.println("|----Find Bank Details Using IFSC CODE----|");
System.out.println("| |");
System.out.println("| |");
System.out.println("|Enter your 11-Digit IFSC code: |");
System.out.print("|");
ifsc=sc.next();
if(ifsc.length()!=11){//validates ifsc by its lenght
error404();
}
System.out.println("|-----------------------------------------|");
System.out.println("");
return ifsc;
}
//displays output
public void output(String ifsc,String micr,String bank,String add){
System.out.println("###########################################");
System.out.println("#");
System.out.println("#SEARCH SUCCESSFUL...");
System.out.println("#");
System.out.println("#IFSC CODE::"+ifsc);
System.out.println("#MICR CODE::"+micr);
System.out.println("#BANK NAME::"+bank);
System.out.println("#ADDRESS ::"+add);
System.out.println("#");
System.out.println("###########################################");
}
//show error if invalid size
public void error404(){
System.out.println("|ERROR 404: INVAILD IFSC |");
System.out.println("|Reason:Invalid size |");
System.out.println("|-----------------------------------------|");
System.exit(0);
}
7
PROJECT 1: SEARCH BANK BY IFSC
8
PROJECT 1: SEARCH BANK BY IFSC
-:Output Snapshots:-
When IFSC of invalid length is entered
9
PROJECT 1: SEARCH BANK BY IFSC
10