SlideShare a Scribd company logo
1 of 52
PROJECT REPORT
•SUBMITTED BY:
Project-1
SNAKE GAME
For this project we need GUI application
This project is having three classes
1.GameFrame.Java
2.GamePanel.Java
3.SnakeGame.Java
//Code for SnakeGame.Java
//Code for GameFrame.Java
//Code for GamePanel.Java
Output:
PROJECT-2
BANKING MANAGEMENT SYSTEM
This java program has following main menus:
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.
Coding
import java.util.Scanner;
class Bank {
private String accno;
private String name;
private long balance;
Scanner KB = new Scanner(System.in);
//This is a 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();
}
//This is a method to display account details
void showAccount() {
System.out.println(accno + "," + name + "," + balance);
}
//This is a method to deposit money
void deposit() {
long amt;
System.out.println("Enter Amount U Want to Deposit : ");
amt = KB.nextLong();
balance = balance + amt;
}
//This is a 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..");
}
}
//This is a 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);
//To 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();
}
//By using switch we can perform actions like main menu ,
display all, deposit ,withdrawal and finally exit
int ch;
do {
System.out.println("Main Menun1. Display Alln 2. Search
By Accountn 3. Depositn 4. Withdrawaln 5.E xit ");
System.out.println("Ur Choice :"); ch = KB.nextInt();
switch (ch) {
case 1: //This case is used to perform main menu
for (int i = 0; i < C.length; i++) {
C[i].showAccount();
}
break;
case 2: // This case is used to perform “display all” function
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: //This case is used to perform deposit operation
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: //This case is used to perform withdrawal operation
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:
PROJECT-3
SCHOOL MANAGEMENT SYSTEM
This project just uses core java without any GUI. This is for those who just have started
programming in java and want to learn a little more about object-oriented programming
applications in core java.
We have used three classes and main class
1.School.Java
2.Student.Java
3.Teacher.Java
4.Main.Java
//Code for “School Class”
//Code for Student Class
//Code for Teacher Class
//Code for Main Class
Output:
PROJECT-4
ATM INTERFACE
THIS PROGRAM PROJECT HAVING 5 CLASSES
1.ACCOUNT.JAVA
2.ATM.Java
3.Bank.Java
4.Transaction.Java
5.User.Java
//Code for ACCOUNT.Java
// code for ATM.Java
//Code for Bank.Java
//Code for Transaction.Java
//Code for User.Java
Output:
JAVA PROJECT REPORT.pptx

More Related Content

Similar to JAVA PROJECT REPORT.pptx

Cbse computer science (c++) class 12 board project bank managment system
Cbse computer science (c++)  class 12 board project  bank managment systemCbse computer science (c++)  class 12 board project  bank managment system
Cbse computer science (c++) class 12 board project bank managment systempranoy_seenu
 
The java program that simulates ATM operations. The prog.pdf
  The java program that simulates ATM operations.  The prog.pdf  The java program that simulates ATM operations.  The prog.pdf
The java program that simulates ATM operations. The prog.pdfpoddaranand1
 
CalculatorProject.pdf
CalculatorProject.pdfCalculatorProject.pdf
CalculatorProject.pdfblueline4
 
IP project for class 12 cbse
IP project for class 12 cbseIP project for class 12 cbse
IP project for class 12 cbsesiddharthjha34
 
Procedure to create_the_calculator_application java
Procedure to create_the_calculator_application javaProcedure to create_the_calculator_application java
Procedure to create_the_calculator_application javagthe
 
Hi,I have updated the code as per your requirement. Highlighted th.pdf
Hi,I have updated the code as per your requirement. Highlighted th.pdfHi,I have updated the code as per your requirement. Highlighted th.pdf
Hi,I have updated the code as per your requirement. Highlighted th.pdfannaindustries
 
Micro services from scratch - Part 1
Micro services from scratch - Part 1Micro services from scratch - Part 1
Micro services from scratch - Part 1Azrul MADISA
 
Java: Class Design Examples
Java: Class Design ExamplesJava: Class Design Examples
Java: Class Design ExamplesTareq Hasan
 
OOP PPT Group H.pptx
OOP PPT Group H.pptxOOP PPT Group H.pptx
OOP PPT Group H.pptx20021519016
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd marchRajeev Sharan
 
Java Practical File Diploma
Java Practical File DiplomaJava Practical File Diploma
Java Practical File Diplomamustkeem khan
 
The War is Over, and JavaScript has won: Living Under the JS Regime
The War is Over, and JavaScript has won: Living Under the JS RegimeThe War is Over, and JavaScript has won: Living Under the JS Regime
The War is Over, and JavaScript has won: Living Under the JS Regimematthoneycutt
 
I am constantly getting errors and cannot figure this out. Please he.pdf
I am constantly getting errors and cannot figure this out. Please he.pdfI am constantly getting errors and cannot figure this out. Please he.pdf
I am constantly getting errors and cannot figure this out. Please he.pdfallystraders
 
Reminder Application by Qt and C++
Reminder Application by Qt and C++Reminder Application by Qt and C++
Reminder Application by Qt and C++Sumaia Alavi
 
Cis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.comCis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.comrobertledwes38
 
Atm simulation mini project using Python programming language
Atm simulation  mini project using Python programming language Atm simulation  mini project using Python programming language
Atm simulation mini project using Python programming language Mauryasuraj98
 
Gui builder
Gui builderGui builder
Gui builderlearnt
 

Similar to JAVA PROJECT REPORT.pptx (20)

Cbse computer science (c++) class 12 board project bank managment system
Cbse computer science (c++)  class 12 board project  bank managment systemCbse computer science (c++)  class 12 board project  bank managment system
Cbse computer science (c++) class 12 board project bank managment system
 
The java program that simulates ATM operations. The prog.pdf
  The java program that simulates ATM operations.  The prog.pdf  The java program that simulates ATM operations.  The prog.pdf
The java program that simulates ATM operations. The prog.pdf
 
CalculatorProject.pdf
CalculatorProject.pdfCalculatorProject.pdf
CalculatorProject.pdf
 
IP project for class 12 cbse
IP project for class 12 cbseIP project for class 12 cbse
IP project for class 12 cbse
 
Distributed banking system using rmi project
Distributed banking system using rmi projectDistributed banking system using rmi project
Distributed banking system using rmi project
 
Procedure to create_the_calculator_application java
Procedure to create_the_calculator_application javaProcedure to create_the_calculator_application java
Procedure to create_the_calculator_application java
 
Hi,I have updated the code as per your requirement. Highlighted th.pdf
Hi,I have updated the code as per your requirement. Highlighted th.pdfHi,I have updated the code as per your requirement. Highlighted th.pdf
Hi,I have updated the code as per your requirement. Highlighted th.pdf
 
Micro services from scratch - Part 1
Micro services from scratch - Part 1Micro services from scratch - Part 1
Micro services from scratch - Part 1
 
Java: Class Design Examples
Java: Class Design ExamplesJava: Class Design Examples
Java: Class Design Examples
 
Practice
PracticePractice
Practice
 
OOP PPT Group H.pptx
OOP PPT Group H.pptxOOP PPT Group H.pptx
OOP PPT Group H.pptx
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
Java Practical File Diploma
Java Practical File DiplomaJava Practical File Diploma
Java Practical File Diploma
 
The War is Over, and JavaScript has won: Living Under the JS Regime
The War is Over, and JavaScript has won: Living Under the JS RegimeThe War is Over, and JavaScript has won: Living Under the JS Regime
The War is Over, and JavaScript has won: Living Under the JS Regime
 
I am constantly getting errors and cannot figure this out. Please he.pdf
I am constantly getting errors and cannot figure this out. Please he.pdfI am constantly getting errors and cannot figure this out. Please he.pdf
I am constantly getting errors and cannot figure this out. Please he.pdf
 
Class
ClassClass
Class
 
Reminder Application by Qt and C++
Reminder Application by Qt and C++Reminder Application by Qt and C++
Reminder Application by Qt and C++
 
Cis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.comCis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.com
 
Atm simulation mini project using Python programming language
Atm simulation  mini project using Python programming language Atm simulation  mini project using Python programming language
Atm simulation mini project using Python programming language
 
Gui builder
Gui builderGui builder
Gui builder
 

Recently uploaded

Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Recently uploaded (20)

Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 

JAVA PROJECT REPORT.pptx

  • 2. Project-1 SNAKE GAME For this project we need GUI application This project is having three classes 1.GameFrame.Java 2.GamePanel.Java 3.SnakeGame.Java
  • 6.
  • 7.
  • 8.
  • 9.
  • 11.
  • 12. PROJECT-2 BANKING MANAGEMENT SYSTEM This java program has following main menus: 1.Display All 2.Search By Account 3.Deposit 4.Withdrawal 5.Exit
  • 13. 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. Coding import java.util.Scanner; class Bank { private String accno; private String name; private long balance; Scanner KB = new Scanner(System.in);
  • 14. //This is a 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(); } //This is a method to display account details void showAccount() { System.out.println(accno + "," + name + "," + balance); }
  • 15. //This is a method to deposit money void deposit() { long amt; System.out.println("Enter Amount U Want to Deposit : "); amt = KB.nextLong(); balance = balance + amt; } //This is a 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.."); } }
  • 16. //This is a method to search an account number boolean search(String acn) { if (accno.equals(acn)) { showAccount(); return (true); } return (false); } }
  • 17. public class ExBank { public static void main(String arg[]) { Scanner KB = new Scanner(System.in); //To 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(); }
  • 18. //By using switch we can perform actions like main menu , display all, deposit ,withdrawal and finally exit int ch; do { System.out.println("Main Menun1. Display Alln 2. Search By Accountn 3. Depositn 4. Withdrawaln 5.E xit "); System.out.println("Ur Choice :"); ch = KB.nextInt(); switch (ch) { case 1: //This case is used to perform main menu for (int i = 0; i < C.length; i++) { C[i].showAccount(); } break;
  • 19. case 2: // This case is used to perform “display all” function 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;
  • 20. case 3: //This case is used to perform deposit operation 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;
  • 21. case 4: //This case is used to perform withdrawal operation 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;
  • 23.
  • 24. PROJECT-3 SCHOOL MANAGEMENT SYSTEM This project just uses core java without any GUI. This is for those who just have started programming in java and want to learn a little more about object-oriented programming applications in core java. We have used three classes and main class 1.School.Java 2.Student.Java 3.Teacher.Java 4.Main.Java
  • 26.
  • 27.
  • 29.
  • 30.
  • 32.
  • 35. PROJECT-4 ATM INTERFACE THIS PROGRAM PROJECT HAVING 5 CLASSES 1.ACCOUNT.JAVA 2.ATM.Java 3.Bank.Java 4.Transaction.Java 5.User.Java
  • 37.
  • 38. // code for ATM.Java
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 45.
  • 46.
  • 49.
  • 50.