JAVA Microproject
JAVA Microproject
1
INTRODUCTION
Java is an object-oriented programming language developed
by James Gosling in "sun microsystems" and it was released in 1995.
Java is a set of features of c and c++. It has obtained its format
from c and features from c++.
Java code that runs on one platform does not need to be
recompiled to run on another platform it's called write once, run
anywhere (WORA).
Some Important features of java are given below:
1. Simple
2. Object-Oriented
3. Portable
4. Platform independent
5. Secured
6. Robust
7. Architecture neutral
8. Interpreted
9. High Performance
10. Multithreaded
11. Distributed
12. Dynamic
Program code
import java.util.Scanner;
class Bank
{
private String accno;
private String name;
private long balance;
Scanner KB=new Scanner(System.in);
pg. 3
//method to display account details
void showAccount()
{
System.out.println(accno+","+name+","+balance);
}
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)
pg. 5
{
break;
}
}
if(!found)
{
System.out.println("Search Failed..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;
pg. 6
}
}
if(!found)
{
System.out.println("Search. Failed
account
not
Exist.. ");
}
break;
case 5:
System.out.println("Good Bye..");
break;
}
}
while(ch!=5);
}
}
pg. 7
pg. 8
pg. 9
pg. 10