Best Projects

Bug Trackingsystem,Books online shopping,college management system,HR management system,Internet banking,Online chat room ,Online exam,Telephone billing system,Banking application,ATM database,airways reservation system,virtual network computing ,calculator,SMTP(simple mail transfer protocol)

DataBaseSimulation















DATABASE-SIMULATION


CONTENTS


Introduction
Need Analysis/Preliminary Investigation
Objectives
System Requirements/Methodology
Data Flow Diagrams
Input Forms
Coding
Output Forms
Unit Testing and System Testing
Limitations and Problems Faced
Fall Outs and Suggestions for the Future work
Conclusion
References/Bibliography
















INTRODUCTION
----------------------------------------------------------------------------------------------------------


















NEED ANALYSIS / PRELIMINARY INVESTIGATION


One of the most difficult tasks of the system analyst is identifying the real problem of the existing system. Without clear understanding of the problem in the system, any further work done will lead to the wastage of effort at a later stage.

The purpose of the Preliminary Investigation is to evaluate the project requests. It is the collection of the information that helps the committee members to evaluate the merits of the project request and make an informed judgment about the feasibility of the project.

My preliminary investigation was dome by Mrs. Geeta Dahiya and Ms. Pooja Gandhi. After their recommendations, I (Ruchika) move on to the further progress of the project.

















Project mission and objectives
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Mission

Database-Simulation project provides more security to the user by providing every user with username and password before creating its own database. After creating their own database, every user can create as many tables as he needed in their own database. The user can further open the database only if he knows the username and password.
Hence, this application has been designed to implement the overall working of a DATABASE in JAVA Platform.
With the help of this application, one can be able to create its own secured database in the computerized way rather than manually.

Objectives

Increased efficiency:-
This project increases efficiency of manpower with computer in various works. It does not require any creativity which can exhaust soon
Less Time Consuming:-
It is user friendly and less time consuming with bottom line option.
Reduction of Manpower:-
It serves a lot of desk work as there are no efforts in manipulating records.
Less use of paper work:-
In manual system a large number of files are required but in our system paper requirement is very less.
Save memory:-
In computerized systems we are able to save large amount of information.

System Requirements
-----------------------------------------------------------------------------------------------------------------------



Software Requirements

Microsoft Windows 2000/XP Operating System.
Java2 software development kit (J2sdk1.4 Onwards)





Hardware Requirements
------------------------------------------------------

· Processor : P-IV, 2.4GHz

· Hard Disk : 40 GB

· RAM : 256 MB

· CD-ROM









METHODOLOGIES

ABOUT JAVA

Java is a platform independent language that could be used to create software to be embedded in various consumer electronic devices, such as Microwave ovens and Remote Controls. With the emergence of the World Wide Web, java was propelled to the forefront of computer language design, because the Web, too, demanded portable programs.

Hence java was switched from consumer electronics to Internet Programming. Java derives much of its character from C and C++. In addition to the surface similarities , java shares some of the other attributes that helped make C and C++ successful. Because of the similarities between java and C++, it is tempting to think of java as simply the “Internet Version of C++”.

The Java 2 SDK is a development environment for building applications, applets, and components using the Java programming language.

The Java 2 SDK includes tools useful for developing and testing programs written in the Java programming language and running on the Java platform. These tools are designed to be used from the command line. Except for the applet viewer, these tools do not provide a graphical user interface.






Java Applets and Application

Java can be used to create two types of programs: Applications and Applets.

An Application is a program that runs on your computer, under the operating system of that computer.

An Applet is an application designed to be transmitted over the Internet and executed by a Java- compatible Web Browser. An applet is actually a tiny java program, dynamically downloaded across the Network, just like an image, sound file, or video clip. An important difference is that an applet is an intelligent program, not just an animation or media file.

java.awt. *:

This package contain AWT classes.It is one of the Java’s largest package.Some of the classes it contain are:
AWTEvent
BorderLayout
Button
Checkbox
CheckBoxGroup
Container
Event
Font
Frame
GraphicsDevices

java.awt.event. *:
Swings and applets are event-driven programs. Most events are passed to applets and swings in a variety of ways, with the specific methods depending upon the actual event. There are several types of events. All such events are supported by the java.awt.event. *

javax.swing.* :
Swing is a set of classes that provides more powerful and flexible components than are possible with the AWT .
The swing related classes are contained in javax.swing.tree like:
AbstractButton
ButtonGroup
ImageIcon
JApplet
JButton
JCheckBox
JComboBox
JLabel
JTable
JTree

java.io. *:
This header file provides support for I/O operations.It contain classes like:
BufferedInputStream
BufferedOutputStream
File
FileReader
FileWriter
OutputStream




java.io.File.* :

File class deals with files and the file system i.e, it does not specify how information is retrieved from or stored in files, it describes properties of a file itself .A file object is used to obtain or manipulate the information associated with a disk file .
The following are the constructors :
File(String directoryPath)
File(String directoryPath ,String filename)
File(File dirObj ,String filename)
File(URL uriObj)

java.util. *:

A collection is a group of objects .The addition of collections caused fundamental alterations in the structure and the architecture of many elements. This header file contains collection. Its some of the classes are:
AbtractCollection
Arrays
Collections
Date
Calender
Properties
Timer
StringTokenizer






ActionListener Interface :

This interface defines the actionPerformed() method that is invoked when an action event occurs. Its general form is:

Void actionPerformed(ActionEvent ae)

ItemListener Interface :

This interface defines the itemStateChanged() method that is invoked when the state of an item change.its general form is :

Void itemStateChanged(itamEvent ie)

Collections:

A collection is a group of objects. The addition of collections caused fundamental alterations in the structure and the alterations of many elements of many elements in java.util.

ContentPane :

The difference between applet and Japplet is that when adding a
Component to an instance of Japplet ,Do not invoke the add of
The applet. Instead call add() for the content pane of the
Japplet object.

Container getContentPane()

LayoutManager :

Each container object has a layout manager associated with
It. It is an instance of any class that implements the
Layoutmanger interface.The layout manger is set by the
setLayout() method is made, then thedefault layout manager is
used.
General forms:
Void setLayout(LayoutManager layoutObj)
Tables
A table is a collection of data about a specific topic, such as students or contacts. Using a separate table for each topic means that you store that data only once, which makes your database more efficient, and reduces data-entry errors.
Tables organize data into columns (called fields) and rows (called records).











Data Flow Diagram
------------------------------------------ ------------------------------------------------------------------------------------

Data-flow diagrams (DFD) are very effective Software-Engineering Tools. They help to identify various sub-modules of a program, the interaction between them and the flow of data between various modules. Going further down the hierarchy, a DFD also represents and explains the functioning of various modules separately.

A DFD is an important part of Software documentation as it keeps a record of what the software is doing and easier to understand than the actual programming code.

DFD Conventional Notations
Many conventional notations are defined for drawing DFD’s to maintain a standard format throughout the world. Certain primitive shapes are reserved for specific representations only. Some of these primitives are:


Data Storage



Processes



Data Flow



External Entity



DFD Hierarchy

DFD’s follow a hierarchy to completely define the program functionality. The hierarchy begins at Level 0 which is also known as context level.

Context level DFD: Context level provides an overview of the whole program. It represents the interaction of sub-modules and it also represents the interaction.


LEVEL 1 DFD: Next comes the level 1. There an be many level 1 DFD’s for a program, depending on the number of modules in the program. Each level 1 DFD represents the basic functioning of the module for which it is defined. If defines the data flow and user interaction of each module. It also defines various sub-modules of that module (if any) and their brief functionality.


FURTHER LEVELS: After level 1 further level can be defined to further explain the functioning of each module’s sub-modules and their sub-modules.














































ZERO (0) LEVEL DFD


MAIN LEVEL DFD









USER VERIFICATION

















CHECKING PROCESS
















Input Forms
------------------------------------------------------------------------------------


MAIIN FRAME









LOGIN FORM













TABLE CREATION FORMS

TABLE CREATION FRAME












FIELD GENERATION FORM


















DATA ENTRY FORM




















Juser.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class Juser extends JFrame implements ActionListener,MenuListener {
JTextField field;
Container cp;
public Juser()
{
cp=getContentPane();
JMenuBar bar = new JMenuBar();
JMenu menu = new JMenu("USER");
JMenuItem tmp1,tmp2,tmp3,tmp4,tmp5,tmp6;
menu.addMenuListener(this);
tmp1 = new JMenuItem("NEW USER");
tmp1.addActionListener(this);
tmp1.setActionCommand("NEW USER");
menu.add(tmp1);

tmp2 = new JMenuItem("OPEN USER");
tmp2.addActionListener(this);
tmp2.setActionCommand("OPEN USER");
menu.add(tmp2);

tmp3 = new JMenuItem("DELETE USER");
tmp3.addActionListener(this);
tmp3.setActionCommand("DELETE USER");
menu.add(tmp3);

tmp4 = new JMenuItem("EXIT");
tmp4.addActionListener(this);
tmp4.setActionCommand("EXIT");
menu.add(tmp4);
bar.add(menu);
setJMenuBar(bar);
field = new JTextField(10);
field.addActionListener(this);
field.setActionCommand("text field activated");
cp.add( "South",field);
JMenu menu1 = new JMenu("SEARCH");
cp.setBackground(Color.lightGray);
cp.setLayout(new BorderLayout());
menu.addMenuListener(this);
tmp5 = new JMenuItem("BY NAME");
tmp5.addActionListener(this);
tmp5.setActionCommand("BY NAME");
menu1.add(tmp5);
bar.add(menu1);
}
public void actionPerformed(ActionEvent ae) {
String cmd;
cmd = ae.getActionCommand();
field.setText(cmd);
if(cmd.equals("NEW USER"))
{
Passnew pw1=new Passnew(this);
}

if(cmd.equals("OPEN USER"))
{
Passopen pw2=new Passopen(this);
}

if(cmd.equals("DELETE USER"))
{
Passdel pw3=new Passdel();
}
if(cmd.equals("EXIT"))
{
System.exit(0);
}
if(cmd.equals("BY NAME"))
{
search s1 = new search();
}
}
public void menuSelected(MenuEvent e)
{
}
public void menuDeselected(MenuEvent e)
{
}
public void menuCanceled(MenuEvent e)
{
}
public Dimension getPreferredSize()
{
return new Dimension(980,550);
}

public static void main(String a[])
{
Juser ju=new Juser();
ju.setForeground(Color.black);
ju.setBackground(Color.lightGray);
ju.addWindowListener(new WindowCloser());
ju.setSize(980,550);
ju.setVisible(true);
}
}

class WindowCloser extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
Window win = e.getWindow();
win.setVisible(false);
System.exit(0);
}
}





Passnew.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

public class Passnew extends JFrame implements ActionListener
{
JTextField jtf1;
JPasswordField jtf2;
Container c ;
JLabel jl1,jl2,jl3,label;
JButton jb,jb1;
String user="",password="";
Juser j;
public Passnew(Juser j)
{
this.j=j;
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent w){
setVisible(false);
}});

c =getContentPane();
c.setLayout(new FlowLayout());
jl1=new JLabel("ENTER USER NAME",JLabel.CENTER);
c.add(jl1);
jtf1=new JTextField(10);
c.add(jtf1);
jl2=new JLabel("ENTER PASSWORD",JLabel.CENTER);
c.add(jl2);
jtf2=new JPasswordField(10);
c.add(jtf2);
jb=new JButton("CREATE");
jb.addActionListener(this);
c.add(jb);
jb1=new JButton("CANCEL");
jb1.addActionListener(this);
c.add(jb1);
jl3=new JLabel("",JLabel.CENTER);
c.add(jl3);
c.setForeground(Color.black);
c.setBackground(Color.lightGray);
setBounds(250,200,300,150);
c.setLayout(new FlowLayout(FlowLayout.CENTER));
setVisible(true);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource()==jb)
{
Juser ju = new Juser();
user=jtf1.getText();
//String
password=jtf2.getText();
try{
File u=new File("c:/j2sdk1.4.1_01/bin/database/" +user);
if(u.exists()){
jl3.setText("USER ALREADY EXISTS");
}
else{
u.mkdir();
File p=new File("c:/j2sdk1.4.1_01/bin/database/"+user+"/"+password);
p.mkdir();

Jtable jt=new Jtable(user,password);
}
}catch(Exception e){System.out.println(e);}
}
if(ae.getSource() == jb1)
{
setVisible(false);
}
}
}

Jtable.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class Jtable extends JFrame implements ActionListener,MenuListener {
JTextField field,field1;
JLabel jl;
Container cp1;
String user="",password="";
public Jtable(String user,String password)
{
this.user=user;
this.password=password;
cp1=getContentPane();

////////////////////added from main//////////////////////////

cp1.setForeground(Color.black);
cp1.setBackground(Color.lightGray);
addWindowListener(new WindowCloser());
setSize(980,550);
setVisible(true);

/////////////////////////////////////////////////////////////
JMenuBar bar = new JMenuBar();
JMenu menu = new JMenu("TABLE");
JMenuItem tmp1,tmp2,tmp3,tmp4,tmp5,tmp6;
menu.addMenuListener(this);
tmp1 = new JMenuItem("NEW");
tmp1.addActionListener(this);
tmp1.setActionCommand("NEW");
menu.add(tmp1);

tmp2 = new JMenuItem("OPEN");
tmp2.addActionListener(this);
tmp2.setActionCommand("OPEN");
menu.add(tmp2);

tmp3 = new JMenuItem("DELETE");
tmp3.addActionListener(this);
tmp3.setActionCommand("DELETE");
menu.add(tmp3);

tmp4 = new JMenuItem("EXIT");
tmp4.addActionListener(this);
tmp4.setActionCommand("EXIT");
menu.add(tmp4);

bar.add(menu);
setJMenuBar(bar);
field = new JTextField(10);
field.addActionListener(this);
field.setActionCommand("text field activated");
cp1.add( "South",field);
JMenu menu1 = new JMenu("SEARCH");
cp1.setBackground(Color.lightGray);
cp1.setLayout(new BorderLayout());
menu.addMenuListener(this);
tmp5 = new JMenuItem("BY NAME");
tmp5.addActionListener(this);
tmp5.setActionCommand("BY NAME");
menu1.add(tmp5);
bar.add(menu1);
}
public void actionPerformed(ActionEvent ae) {
String cmd;
cmd = ae.getActionCommand();
field.setText(cmd);
if(cmd.equals("NEW"))
{
table2 t2=new table2(user,password);
}

if(cmd.equals("OPEN"))
{
table3 t3=new table3(user,password);
}
If(cmd.equals("DELETE"))
{
tabledel tt3 = new tabledel(user,password);
}
if(cmd.equals("EXIT"))
{
System.exit(0);
}
if(cmd.equals("BY NAME"))
{
searchtab st = new searchtab(user,password);
}
}
public void menuSelected(MenuEvent e)
{
}
public void menuDeselected(MenuEvent e)
{
}
public void menuCanceled(MenuEvent e)
{
}
public Dimension getPreferredSize()
{
return new Dimension(980,550);
}
class WindowCloser extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
Window win = e.getWindow();
win.setVisible(false);
System.exit(0);
}
}
}

Password.java
-------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class PassWord extends JPanel implements ActionListener
{
JTextField jtf;
public PassWord(Jframe frame)
{
setLayout(new FlowLayout(FlowLayout.CENTER));
JLabel j1=new JLabel("ENTER USER NAME",JLabel.CENTER);
add(j1);
jtf=new JTextField(10);
add(jtf);
JLabel j2=new JLabel("ENTER PASSWORD",JLabel.CENTER);
add(j2);
jtf=new JTextField(10);
add(jtf);
JButton jb=new JButton("CREATE");
jb.addActionListener(this);
add(jb);
jb=new JButton("CANCEL");
jb.addActionListener(this);
add(jb);
}

public void actionPerformed(ActionEvent ae)
{
}
public static void main(String a[])
{
JFrame frame = new JFrame("PassWord");
PassWord panel = new PassWord(frame);

frame.setForeground(Color.black);
frame.setBackground(Color.lightGray);
frame.addWindowListener(new WindowCloser());
frame.getContentPane().add(panel,"Center");
frame.setSize(300,150);
frame.setVisible(true);
}
}

class WindowCloser extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
Window win = e.getWindow();
win.setVisible(false);
System.exit(0);
}
}















Table1.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;

public class table1 extends JFrame implements ActionListener
{
Object[] data = new Object[2];
String user="",password="";
String file1="";
Container c;
DefaultTableModel dtm;
JPanel p;
///////////////////////////////
JButton jb1;
JButton jb2;
JButton jb3;
JButton jb4;
JTable jtable;

//////////////////////////////////

public table1(String user,String password,String file1)
{
this.user=user;
this.password=password;
this.file1=file1;

//////////////////////////////////////////

jb1 = new JButton("CREATE NEW ROW");
jb2 = new JButton("CREATE NEW COLUMN");
jb3 = new JButton("SAVE");
jb4 = new JButton("CANCEL");

///////////////////////////////////////
p=new JPanel();
c=getContentPane();
dtm = new DefaultTableModel();
jtable = new JTable(dtm);

/////////////////////////////////////////////
p.add(jb1);
p.add(jb2);
p.add(jb3);
p.add(jb4);
jb1.addActionListener(this);
jb2.addActionListener(this);
jb3.addActionListener(this);
jb4.addActionListener(this);

//////////////////////////////////////////
String s = new String("manu");
for(int col = 0;col<2;col++)
{
dtm.addColumn("column"+col);
}

for(int row=0;row<2;row++)
{
for(int col =0;col<2;col++)
{
data[col]=null;
}
dtm.addRow(data);
}
c.add(new JScrollPane(jtable),BorderLayout.CENTER);
c.add(p,BorderLayout.SOUTH);
setSize(800,550);
setVisible(true);
}

///////////////////////////////////////////////////////////

public void actionPerformed(ActionEvent e)
{
if(e.getSource() == jb1) {
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
Object[] data = new Object[nc];

for (int col=0;col {
data[col] = "";
}
dtm.addRow(data);
}
else if(e.getSource() == jb2)
{
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
dtm.addColumn("column" + nc);
}
else if(e.getSource() == jb3)
{
try{
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
File file = new File("c:/j2sdk1.4.1_01/bin/database/"+user+"/"+password+"/"+file1+".txt");
FileOutputStream foi = new FileOutputStream(file,true);
PrintWriter pw=new PrintWriter(new OutputStreamWriter(foi));

for(int row=0;row{
for(int col=0;col{
String sss=(String)jtable.getValueAt(row,col);
pw.print(sss);
pw.print("*");
}
pw.print("!");
}
pw.close();

}
catch(Exception ee){}
}
else if(e.getSource() == jb4)
{
System.exit(0);
}
jtable.sizeColumnsToFit(0);
}
}






















Table2.java
-------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;

public class table2 extends JFrame implements ActionListener
{
Object[] data = new Object[5];
Container c;
DefaultTableModel dtm;
JPanel p;
///////////////////////////////
JLabel jl1;
JTextField jtf1;
JButton jb1;
JButton jb3;
JButton jb4;
JTable jtable;
String user="",password="";
String file1 = "";
//////////////////////////////////
public table2(String user,String password)
{
this.user=user;
this.password=password;
//////////////////////////////////////////
jl1 = new JLabel("ENTER NAME OF TABLE");
jtf1 = new JTextField(20);
jb1 = new JButton("CREATE NEW ROW");
jb3 = new JButton("CREATE");
jb4 = new JButton("CANCEL");
///////////////////////////////////////
p=new JPanel();
c=getContentPane();
dtm = new DefaultTableModel();
jtable = new JTable(dtm);
/////////////////////////////////////////////
p.add(jl1);
p.add(jtf1);
p.add(jb1);
p.add(jb3);
p.add(jb4);
jtf1.addActionListener(this);
jb1.addActionListener(this);
jb3.addActionListener(this);
jb4.addActionListener(this);
//////////////////////////////////////////
for(int col = 0;col<2;col++)
{
if(col==0)
{
dtm.addColumn("FIELD TYPE ");
}
else
{
dtm.addColumn("DATA TYPE");
}
}
for(int row=0;row<2;row++)
{
for(int col = 0;col<2;col++)
{
data[col]="";
}
dtm.addRow(data);
}
c.add(new JScrollPane(jtable),BorderLayout.CENTER);
c.add(p,BorderLayout.SOUTH);
setSize(800,550);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource() == jb1) {
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
Object[] data = new Object[nc];
for (int col=0;col {
data[col] = "";
}
dtm.addRow(data);
}
else if(e.getSource() == jb3)
{
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
try {
file1 = jtf1.getText();
File f = new File("c:/j2sdk1.4.1_01/bin/database/"+user+"/"+password+"/"+file1+".txt");
FileOutputStream foi = new FileOutputStream(f,true);
PrintWriter pw=new PrintWriter(new OutputStreamWriter(foi));
for(int row=0;row {
for(int col = 0;col<2;col++)
{
String ssss=(String)jtable.getValueAt(row,col);
pw.println(ssss);
}
}
pw.close();
}
catch(Exception ee){}
table1 tt1 = new table1(user,password,file1);
}
else if(e.getSource() == jb4)
{
setVisible(false);
}
jtable.sizeColumnsToFit(0);
}
}


Table3.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;

public class table3 extends JFrame implements ActionListener
{
Object[] data = new Object[2];
Container c;
int nc,nr,ncol;
String [][]str1=new String[50][50];
int count1=0,count2=0;
JLabel jl;
JTextField tf2;
JButton jb5;
JTable jt;
DefaultTableModel dtm=new DefaultTableModel();
///////////////////////////////
JPanel p;
JButton jb1;
JButton jb2;
JButton jb3;
JButton jb4;
JTable jtable = new JTable(dtm);
//////////////////////////////////
String user = "";
String password = "";
public table3(String user,String password)
{
this.user = user;
this.password = password;
//////////////////////////////////////////
jl = new JLabel("ENTER TABLE NAME");
tf2 = new JTextField(20);
jb5 = new JButton("OPEN");
jb1 = new JButton("ADD NEW ROW");
jb2 = new JButton("ADD NEW COLUMN");
jb3 = new JButton("SAVE");
jb4 = new JButton("CANCEL");

///////////////////////////////////////

p=new JPanel();
c=getContentPane();

/////////////////////////////////////////////
p.add(jl);
p.add(tf2);
p.add(jb5);
p.add(jb1);
p.add(jb2);
p.add(jb3);
p.add(jb4);
tf2.addActionListener(this);
jb5.addActionListener(this);
jb1.addActionListener(this);
jb2.addActionListener(this);
jb3.addActionListener(this);
jb4.addActionListener(this);

//////////////////////////////////////////
c.add(p,BorderLayout.NORTH);

setSize(900,600);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource() == jb5) {
try {
String file2 = new String();
file2 = tf2.getText();
File f = new File("c:/j2sdk1.4.1_01/bin/database/"+user+"/"+password+"/"+file2+".txt");

FileInputStream inStream = new FileInputStream(f);
int inbyte = inStream.available();
byte inBuf[] = new byte[inbyte];
int byteread = inStream.read(inBuf,0,inbyte);
nc=0;nr=0;
System.out.println(byteread);
String str="";
for(int j=0;j < byteread;j++)
{
System.out.print((char)inBuf[j]+" ");
str= str + (char)inBuf[j];
if(inBuf[j] == 42 )
{
System.out.println(str);
str1[count1][count2]=str.substring(0,str.length()-1);
count2=count2+1;
if(inBuf[j+1]!=33)
{
str="";
}
nc=nc+1;
}

if(inBuf[j] == 33)
{
count1=count1+1;
count2=0;
str1[count1][count2]=str.substring(1,str.length()-1);
str="";
nr=nr+1;
}
}

inStream.close();
ncol = nc/nr;
System.out.println("no of column "+ncol + "no of row " + nr);
}
catch(Exception eee) {}

for(int col = 0;col{
dtm.addColumn("column"+col);
}

for(int row=0;row{
for(int col =0;col{
String str2;
str2=str1[row][col];
data[col]=str2;
}
dtm.addRow(data);
}
c.add(new JScrollPane(jtable),BorderLayout.CENTER);
setVisible(false);
setVisible(true);
}
if(e.getSource() == jb1)
{
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
Object[] data = new Object[nc];
for (int col=0;col {
data[col] = "0";
}
dtm.addRow(data);
}

if(e.getSource() == jb2)
{
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
dtm.addColumn("column" + nc);
}

if(e.getSource() == jb3)
{
try{
int nr = dtm.getRowCount();
int ncol = dtm.getColumnCount();
String file3 = new String();
file3 = tf2.getText();
File f3 = new File("c:/j2sdk1.4.1_01/bin/database/"+user+"/"+password+"/"+file3+".txt");
FileOutputStream foi = new FileOutputStream(f3,true);
PrintWriter pw=new PrintWriter(new OutputStreamWriter(foi));

for(int row=0;row {
for(int col=0;col {
String sss=(String)jtable.getValueAt(row,col);
pw.print(sss);
pw.print("*");
}
pw.print("!");
}
pw.close();
}

catch(Exception ee){}
}

if(e.getSource() == jb4)
{
System.exit(0);
}
jtable.sizeColumnsToFit(0);
}
}






Tabopen.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

public class tabopen extends JFrame implements ActionListener
{

JTextField jtf1;
Container c ;
JLabel j1;
JButton jb,jb1;
Jtable j;
public tabopen(Jtable j)
{
this.j=j;
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent w){
setVisible(false);
}});
c =getContentPane();
c.setLayout(new FlowLayout());
j1=new JLabel("ENTER TABLE NAME",JLabel.CENTER);
c.add(j1);
jtf1=new JTextField(10);
c.add(jtf1);
jb=new JButton("OPEN");
jb.addActionListener(this);
c.add(jb);
jb1=new JButton("CANCEL");
jb1.addActionListener(this);
c.add(jb1);
c.setForeground(Color.black);
c.setBackground(Color.lightGray);
setSize(300,150);
c.setLayout(new FlowLayout(FlowLayout.CENTER));
setVisible(true);
}
public void actionPerformed(ActionEvent ae)
{

if(ae.getSource()==jb)
{
Jtable ju = new Jtable();
String user=jtf1.getText();
try
{
File u=new File(user);
if(u.exists())
{
}
Else
{
JLabel j2= new JLabel("TABLE DOES NOT EXIST",JLabel.CENTER);
c.add(j2);
}
}catch(Exception e){System.out.println(e);}

}
}
}









Tabledel.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

public class tabledel extends JFrame implements ActionListener
{
JTextField jtf1;
Container c ;
JLabel jl1,jl2,jl3,label;
JButton jb,jb1;
String user="",password="";
String tabname;
Juser j;

public tabledel(String user,String password)
{
this.user=user;
this.password=password;
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent w){
setVisible(false);
}});

c =getContentPane();
c.setLayout(new FlowLayout());
jl1=new JLabel("ENTER TABLE NAME",JLabel.CENTER);
c.add(jl1);
jtf1=new JTextField(10);
c.add(jtf1);
jb=new JButton("DELETE");
jb.addActionListener(this);
c.add(jb);
jb1=new JButton("CANCEL");
jb1.addActionListener(this);
c.add(jb1);
jl3=new JLabel("",JLabel.CENTER);
c.add(jl3);

c.setForeground(Color.black);
c.setBackground(Color.lightGray);
setBounds(250,200,300,150);
c.setLayout(new FlowLayout(FlowLayout.CENTER));
setVisible(true);
}

public void actionPerformed(ActionEvent ae)
{
if(ae.getSource()==jb)
{
tabname=jtf1.getText();
try
{
File u=new File("c:/j2sdk1.4.1_01/bin/database/"+user+"/"+password+"/"+tabname+".txt");
if(u.exists()){
u.delete();
jl3.setText(" TABLE DELETED ");

}
else{
jl3.setText("TABLE DOES NOT EXIST");
}
}
catch(Exception e){
System.out.println(e);
}
}
if(ae.getSource() == jb1)
{
setVisible(false);
}
}
}
Choose1.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;

public class choose extends JApplet // implements ActionListener
{
Object[] data = new Object[5];
DefaultTableModel dtm = new DefaultTableModel();
JTable jtable = new JTable(dtm);

public void init()
{
for(int col = 0;col<2;col++)
{

if(col==0)
{
dtm.addColumn("FIELD'S NEME");
}
Else
{
dtm.addColumn("DATA TYPE");
}
}
for(int row=0;row<10;row++)
{
for(int col = 0;col<2;col++)
{
data[col]="";
}

dtm.addRow(data);
}
getContentPane().add(new JScrollPane(jtable),BorderLayout.CENTER);
getContentPane().add(new jpanel(),BorderLayout.SOUTH);
}
class jpanel extends JPanel implements ActionListener
{
JButton jb1 = new JButton("CREATE NEW ROW");
public jpanel()
{
add(jb1);
jb1.addActionListener(this);
}

public void actionPerformed(ActionEvent e)
{
if(e.getSource() == jb1) {
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
Object[] data = new Object[nc];
for (int col=0;col {
data[col] = "";
}
dtm.addRow(data);
}
jtable.sizeColumnsToFit(0);
}
}
}











Dbase.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.io.*;
import java.awt.*;
import java.awt.event.*;

public class dbase extends Frame implements ActionListener,KeyListener
{
String user="",password="";
TextField t;
TextArea ta;
String pt="";
Panel pn;
Button change;
Prompt p;
help hp=null;
public dbase()
{
addWindowListener(new WindowAdapter()

{
public void WindowClosing(WindowEvent w)
{
System.exit(0);
}
});

t=new TextField();
add("south",t);
ta=new TextArea();
ta.setFont(new Font("arial",Font.BOLD,16));
add("Center",ta);
setSize(1000,580);
setVisible(true);
t.addActionListener(this);
pn=new Panel();
pn.setLayout(new FlowLayout());
change=new Button("CHANGE PROMPT");
change.setBounds(450,20,50,30);
pn.add(change);
add("North",pn);
change.addActionListener(this);
t.addKeyListener(this);
p=new prompt(this,"Enter Your Prompt",true);
}
public void actionPerformed(ActionEvent a)
{
if(a.getSource()==t)
{
try{
String s=t.getText ();
if(s.equals("clear screen"))
{
ta.setText("");
}

///////////CREATE USER///////////////

if(s.toLowerCase().startsWith("create user"))
{
user=s.toLowerCase().substring("create user".length(),s.indexOf("identified"));
user=user.trim();
System.out.println(user.length());
File f1=new File(user);
if(f1.exists())
ta.append("\n"+pt+">User Already Exists");
else
{
f1.mkdir();
password=s.substring(s.indexOf("identified")+14,s.length());
File pw=new File("c:/j2sdk1.4.1_01/bin/"+user+"/"+password);
pw.mkdir();
ta.append("\n"+pt+">user created");
try{
Runtime rt=Runtime.getRuntime();
Process p=rt.exec("insert.bat"+user);
Thread.sleep(3000);
f1.deleteOnExit();
}
catch(Exception e)
{
ta.setText(e.toString());
}
}
}

/////////////SELECT FROM TABLE////////////////

if(s.toLowerCase().startsWith("select from"))
{
ta.append("\n"+pt+".");
File f4=new File("c:/j2sdk1.4.1_01/bin/"+user+"/"+s.substring("select from".length(),s.length()));
if(f4.exists())
{
FileInputStream fout2=new FileInputStream(f4);
StreamTokenizer stk=new StreamTokenizer(fout2);
int tok;
while((tok=stk.nextToken())!= -1)
{
stk.eoIIsSignificant(true);
if(tok==StreamTokenizer.TT_EOL)
{
ta.append("\n");
}
if(tok==StreamTokenizer.TT_WORD)
{
String xx=stk.sval.replace(',','a');
ta.append(" "+xx);
}
if(tok==StreamTokenizer.TT_NUMBER)
{
double yy=stk.nval;
ta.append(" "+yy);
}
}
}
else
{
ta.append("\n"+pt+">Object NOT found");
}
}

////////////DROP TABLE//////////////

if(s.toLowerCase().startsWith("drop user"))
{
File f2 = new File(s.toLowerCase().Substring("drop user".length(),s.length()));
if(f2.exists())
{
f2.delete();
ta.append("\n"+pt+">user dropped");
}
else
ta.append("\n"+pt+">no such user");
}

///////////CONNECTING USER///////////////

if(s.toLowerCase().starttWith("connect"))

{
String misa = s.toLowerCase().Substring("connect".length(),s.indexOf('/'));
try
{
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("extract.bat"+misa.trim());
Thread.sleep(5000);
}
catch(Exception e) {}

File f3 = new File(s.toLowerCase().substring("connect".length(),s.indexOf('/').trim()));
user = s.toLowerCase().substring("connect".length(),s.indexOf('/').trim());
File ff = new
File("c:/j2sdk1.4.1_01/bin/"+user+"+s.toLowerCase().substring(s.indexOf('/')+1,s.length());
Syttem.out.println(f3.getPath()+"\n"+ff.getPath());
if(f3.exists()) {
if(ff.exists()) {
ta.append("\n"+pt+">connected");
}
else ta.append("\n wrong password");
}
Else
{
ta.append("\n+pt+"+s.substring("connect".length(),s.indexOf('/'))+"user does not exist");
}
}

//////////CREATING TABLES///////////////

String str = "";
if(s.toLowerCase().startsWith("create table"))
{
String xx = "c:/j2sdk1.4.1_01/bin/"+user+"/"+s.substring("create table".length,s.indexOf('('));
File f3 = new File("c:/j2sdk1.4.1_01/bin/"+user+"/"s.substring("create table".length()'s.indexOf('(')));

if(f3.exists())
ta.append("\n"+pt+">table already exusts");

else
{
File.OutputStream fout1 = new FileOutputStream(xx,true);
str = s.substring(s.indexOf('(')+1,indexOf(')'));
byte b[]=str.getBytes();
fout1.write(b);
ta.append("\n"+pt+">table created");


try {
File ujar = new File("c:/j2sdk1.4.1_01/bin/"+user);
Runtime rt = Runtime.getRuntime();
rt.exec("insert.bat"+user);
Thread.sleep(3000);
ujar.deleteOnExit();
}
catch(Exception e) {}
}
}

///////////DROPPING TABLE//////////////

if(s.toLowerCase().startWith("drop table"))
{
File f4 = new File("c:/j2sdk1.4.1_01/bin/"+user+"/"+s.substring("drop table".length(),s.length()));
if(f4.exists()) {
boolean b1 = f4.delete();
if(b1==true)
ta.append("\n"+pt+">table deleted");
}
else
{
ta.append("\n"+pt+">object not found");
}
try {
File ujar = new File(user);
Runtime rt = Runtime.getRuntime();
rt.exec("insert.bat"+user);
Thread.sleep(3000);
ujar.deleteOnExit();
}
catch(Exception e) {}
}


////////////INSERTING INTO TABLE//////////////

if(s.toLowerCase().startsWith("insert into"))
{

string xy = "c:/j2sdk1.4.1_01/bin" +user+ "/"+s.substring("insert into".length(),s.indexOf("values"));

File f4 = new File("c:/j2sdk1.4.1_01/bin" +user+ "/"+s.substring("insert into".length(),s.indexOf("values")));
if(f4.exists()) {
FileOutputStream fout2 = new FileOutputStream(xy,true);
str = s.substring(s.indexOf("values")+7,s.indexOf(')'));
byte bb[] = ("\n"+str).getBytes();
fout2.write(bb);
ta.append(\n"+pt+">inserted);
}
else
{
ta.append("\n"+pt+>object not found");
}
try
{
File ujar = new File("c:/j2sdk1.4.1_01/bin"+user);
Runtime rt = Runtime.getRuntime();
rt.exec("insert.bat"+user);
Thread.sleep(3000);
ujar.deleteOnExit();
}
catch(Exception e) {}
}
















Jpanel.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;

class jpanel extends JPanel implements ActionListener {
JButton jb1 = new JButton("CREATE NEW ROW");
JButton jb2 = new JButton("CREATE NEW COLUMN");
public jpanel()
{
add(jb1);
add(jb2);
jb1.addActionListener(this);
jb2.addActionListener(this);
}
public void actionPerformed(ActionEvent e) {
if(e.getSource() == jb1) {
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
Object[] data = new Object(nc);
for (int col=0;col data[col] = "";
}
dtm.addRow(data);
}
else if(e.getSource() == jb2) {
int nr = dtm.getRowCount();
int nc = dtm.getColumnCount();
dtm.addColumn("colu"+col);
for (int row=0;row dtm.setValueAt("");
data[col] = "";
}
dtm.addRow(data);
}
}

Passdel.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

public class Passdel extends JFrame implements ActionListener
{

JTextField jtf1;
JPasswordField jtf2;
Container c ;
JLabel j1,j2,j3;
JButton jb,jb1;

public Passdel()

{
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent w){
setVisible(false);
}});

c =getContentPane();
c.setLayout(new FlowLayout());
j1=new JLabel("ENTER USER NAME",JLabel.CENTER);
c.add(j1);
jtf1=new JTextField(10);
c.add(jtf1);
j2=new JLabel("ENTER PASSWORD",JLabel.CENTER);

c.add(j2);
jtf2=new JPasswordField(10);
c.add(jtf2);
jb=new JButton("DELETE");
jb.addActionListener(this);
c.add(jb);
jb1=new JButton("CANCEL");
jb1.addActionListener(this);
c.add(jb1);
j3 = new JLabel();
c.add(j3);

c.setForeground(Color.black);

c.setBackground(Color.lightGray);

setBounds(250,200,300,150);
c.setLayout(new FlowLayout(FlowLayout.CENTER));
setVisible(true);

}

public void actionPerformed(ActionEvent ae)
{

if(ae.getSource()==jb)
{

Juser ju = new Juser();

String user=jtf1.getText();
String pass=jtf2.getText();
try{
File u=new File("c:/j2sdk1.4.1_01/bin/database/"+user);
if(u.exists()){
{
File p=new File("c:/j2sdk1.4.1_01/bin/database/"+user+"/"+pass);

if(p.exists()){

p.delete();
u.delete();
j3.setText(" USER DELETED ");
}
else
j3.setText(" WRONG PASSWORD ");
}
}
Else
{
j3.setText("USER DOES NOT EXISTS");
}
}
catch(Exception e){
System.out.println(e);
}

}
if(ae.getSource() == jb1){
setVisible(false);}
}
}















Passopen.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

public class Passopen extends JFrame implements ActionListener
{

JTextField jtf1;
JPasswordField jtf2;
Container c ;
JLabel j1,j2,j3;
JButton jb,jb1;
Juser j;
Jtable jtable;
String password = "";
String user= "";
public Passopen(Juser j)
{
this.j=j;
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent w){
setVisible(false);
}});

c =getContentPane();
c.setLayout(new FlowLayout());
j1=new JLabel("ENTER USER NAME",JLabel.CENTER);
c.add(j1);
jtf1=new JTextField(10);
c.add(jtf1);
j2=new JLabel("ENTER PASSWORD",JLabel.CENTER);
c.add(j2);
jtf2=new JPasswordField(10);
c.add(jtf2);
jb=new JButton("OPEN");
jb.addActionListener(this);
c.add(jb);
jb1=new JButton("CANCEL");
jb1.addActionListener(this);
c.add(jb1);
j3=new JLabel();
c.add(j3);

c.setForeground(Color.black);
c.setBackground(Color.lightGray);
setBounds(250,200,300,150);
c.setLayout(new FlowLayout(FlowLayout.CENTER));
setVisible(true);
}

public void actionPerformed(ActionEvent ae) {

if(ae.getSource()==jb)
{

// String
user=jtf1.getText();
// String
password=jtf2.getText();

try{
File u = new File("c:/j2sdk1.4.1_01/bin/database/"+user);

if(u.exists()){
File p = new File("c:/j2sdk1.4.1_01/bin/database/"+user+"/"+password);

if(p.exists())
jtable = new Jtable(user,password);

else
j3.setText("YOUR PASSWORD IS WRONG");

}
else
j3.setText("USER DOES NOT EXISTS");
}
catch(Exception e){System.out.println(e);}
}
if(ae.getSource()==jb1) {
setVisible(false);}

}
}





















Search.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

public class search extends JFrame implements ActionListener
{

JTextField jtf1;
Container c ;
JLabel jl1,jl2,jl3,label;
JButton jb,jb1;
String username;
Juser j;
public search()
{
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent w)
{
setVisible(false);
}});

c =getContentPane();
c.setLayout(new FlowLayout());
jl1=new JLabel("ENTER USER NAME",JLabel.CENTER);
c.add(jl1);
jtf1=new JTextField(10);
c.add(jtf1);
jb=new JButton("SEARCH");
jb.addActionListener(this);
c.add(jb);
jb1=new JButton("CANCEL");
jb1.addActionListener(this);
c.add(jb1);
jl3=new JLabel("",JLabel.CENTER);
c.add(jl3);

c.setForeground(Color.black);
c.setBackground(Color.lightGray);
setBounds(250,200,300,150);
c.setLayout(new FlowLayout(FlowLayout.CENTER));
setVisible(true);
}

public void actionPerformed(ActionEvent ae)
{

if(ae.getSource()==jb)
{
username=jtf1.getText();
//String
try{

File u=new File("c:/j2sdk1.4.1_01/bin/database/"+"/"+username);

if(u.exists())
{
jl3.setText(" USER EXISTS ");
}
else{
jl3.setText("USER DOES NOT EXIST");
}

}catch(Exception e){System.out.println(e);}

}
if(ae.getSource() == jb1)
{
setVisible(false);
}
}
}

Searchtab.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

public class searchtab extends JFrame implements ActionListener
{

JTextField jtf1;
Container c ;
JLabel jl1,jl2,jl3,label;
JButton jb,jb1;
String user="",password="";
String tabname;
Juser j;

public searchtab(String user,String password)
{
this.user=user;
this.password=password;
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent w){
setVisible(false);
}});

c =getContentPane();
c.setLayout(new FlowLayout());
jl1=new JLabel("ENTER TABLE NAME",JLabel.CENTER);
c.add(jl1);
jtf1=new JTextField(10);
c.add(jtf1);
jb=new JButton("SEARCH");
jb.addActionListener(this);
c.add(jb);
jb1=new JButton("CANCEL");
jb1.addActionListener(this);
c.add(jb1);
jl3=new JLabel("",JLabel.CENTER);
c.add(jl3);

c.setForeground(Color.black);
c.setBackground(Color.lightGray);
setBounds(250,200,300,150);
c.setLayout(new FlowLayout(FlowLayout.CENTER));
setVisible(true);
}
public void actionPerformed(ActionEvent ae)
{

if(ae.getSource()==jb)
{

tabname=jtf1.getText();
//String
try
{
File u=new File("c:/j2sdk1.4.1_01/bin/database/"+user+"/"+password+"/"+tabname+".txt");

if(u.exists())
{
jl3.setText(" TABLE EXISTS ");
}
else{
jl3.setText("TABLE DOES NOT EXIST");
}
}catch(Exception e){System.out.println(e);}

}
if(ae.getSource() == jb1)
{
setVisible(false);
}
}
}
OUTPUT FORMS
------------------------------------------------------------------------------------

TABLE OUTPUT












STORED DATABASE













SEARCHING USER BY NAME

















DELETING USER














SECURED DATABASE














TESTING
------------------------------------------------------------------------------------


Testing each module individually is called UNIT TESTING.
I have tested each module individually for its proper functioning.

Testing the software after combining the different modules is called SYSTEM TESTING.
I have integrated all the modules properly and tested the software for its proper functioning.

Running the system under live or realistic data by the actual user is called Acceptance Testing.
Realistic data that was given to our project is all the inputs that are been required by any user. For eg. I have added all the features that must be required to create a database.

We have also carried out the execution of our project by many of our friends and Ms. Pooja Gandhi (Java Faculty)

After being giving realistic conditions to our project, we have found the performance of our project quite satisfactory. This project can be implemented by any user.









Limitations and problems faced
-- ---------------------------------------------------------------------------------- -----------------------------------------------------------------------------------

LIMITATION:-

























Fall outs and suggestions for the
future work


Fall Outs:-

1. Any small working Institute like BMIET, APTECH, CMC Computer
center,TATA Infotech etc...
2. It can be beneficial for many Coaching Centers who have been teaching
many courses.


Suggestions for the Future work:-

1. This project can be extended for an Institute running on a large scale.
For e.g- NIIT.
2. Various facilities like college administrative work and whole student management system can be integrated in a single platform .

3. Society comprises of students and candidates who have been learning in
many Institutes. They also needed to access many kind of information at
various stages. If a manual procedure is being used by these Institutes,then
these students may face many difficulties like Institute time, holidays etc...




Conclusion
------------------------------------------------------------------------------------

Rather than using a manual procedure for an Institute, if this computerized project is being implemented then all the students, faculty members and Institute members like Administator can eliminate all the difficulties and can run the Institute successfully in an effective way.

Like students can access their information in a shorter period of time, faculty members convey their messages more effectively and Administrator himself can manage the complete /College Institute in a much better way.






















Books Referred


Java 2 The Complete Reference
-Tata McGraw Hill Publication.
Fundamentals of Java
-E Balaguruswamy

Other References

Microsoft Encyclopedia Encarta 2002.
http://www.javasun.com
http://www.google.com
http://www.altavista.net
http://www.download.com


Adapter_Demo__Mini


DownloadLink:
http://rapidshare.com/files/96373605/Adapter_Demo__Mini_.zip

Applet_Add__Mini


DownloadLink:

http://rapidshare.com/files/96373616/Applet_Add__Mini_.zip

Applet_Frame__Mini


DownloadLink:

http://rapidshare.com/files/96373621/Applet_Frame__Mini_.zip

Applet_Window__Mini


DownloadLink:

http://rapidshare.com/files/96373646/Applet_Window__Mini_.zip

Banner__Mini



DownloadLink:

http://rapidshare.com/files/96373670/Banner__Mini_.zip

Browser__Mini


DownloadLink:
http://rapidshare.com/files/96373678/Browser__Mini_.zip

Choice_List__Mini


DownloadLink:
http://rapidshare.com/files/96373695/Choice_List__Mini_.zip

Clint_Test__Mini


DownloadLink:
http://rapidshare.com/files/96373706/Clint_Test__Mini_.zip

Color_Demo__Mini


DownloadLink:
http://rapidshare.com/files/96373730/Color_Demo__Mini_.zip

Double_Buffer__Mini


DownloadLink:
http://rapidshare.com/files/96373737/Double_Buffer__Mini_.zip

First_Applet__Mini


DownloadLink:

http://rapidshare.com/files/96373748/First_Applet__Mini_.zip

Grid__Mini


DownloadLink:
http://rapidshare.com/files/96373755/Grid__Mini_.zip

HServlet__Mini


DownloadLink:
http://rapidshare.com/files/96373762/HServlet__Mini_.zip

Image_Load__Mini


DownloadLink:

http://rapidshare.com/files/96373782/Image_Load__Mini_.zip

Image_Swing__Mini


DownloadLink:
http://rapidshare.com/files/96373806/Image_Swing__Mini_.zip

Inetaddress_Demo1__Mini


DownloadLink:

http://rapidshare.com/files/96373809/Inetaddress_Demo1__Mini_.zip

InnerClassdemo__Mini


DownloadLink:
http://rapidshare.com/files/96373821/InnerClassdemo__Mini_.zip

Java_Buttons__Mini


DownloadLink:
http://rapidshare.com/files/96373833/Java_Buttons__Mini_.zip

Java_Label__Mini


DownloadLink:
http://rapidshare.com/files/96373849/Java_Label__Mini_.zip

Jdbc_test1__Mini


DownloadLink:

http://rapidshare.com/files/96373875/Jdbc_test1__Mini_.zip

Jdbc update__Mini


DownloadLink:

http://rapidshare.com/files/96373880/Jdbcupdate__Mini_.zip

Jlabeldemo__Mini


DownloadLink:

http://rapidshare.com/files/96373886/Jlabeldemo__Mini_.zip

JScrollPaneDemo_Mini


DownloadLink:

http://rapidshare.com/files/96373901/JScrollPaneDemo_Mini_.zip

Key_Events_Mini


DownloadLink:

http://rapidshare.com/files/96373913/Key_Events_Mini_.zip

Lawte_Mini


DownloadLink:
http://rapidshare.com/files/96373922/Lawte_Mini_.zip

List_Demo_Mini


DownloadLink:

http://rapidshare.com/files/96373928/List_Demo_Mini_.zip

Logo_Mini


DownloadLink:

http://rapidshare.com/files/96373959/Logo_Mini_.zip

Observed_ImageLoad_Mini


DownloadLink:
http://rapidshare.com/files/96373975/Observed_ImageLoad_Mini_.zip

Rectangles_Mini


DownloadLink:

http://rapidshare.com/files/96373983/Rectangles_Mini_.zip

Resize_Me_Mini


DownloadLink:

http://rapidshare.com/files/96373989/Resize_Me_Mini_.zip

Sample_Applet_Mini


DownloadLink:

http://rapidshare.com/files/96373995/Sample_Applet_Mini_.zip

Sb_Demo_Mini


DownloadLink:

http://rapidshare.com/files/96374018/Sb_Demo_Mini_.zip

Server_Test_Mini

DownloadLink:

http://rapidshare.com/files/96374022/Server_Test_Mini_.zip

Servlet_Database_Mini


DownloadLink:

http://rapidshare.com/files/96374029/Servlet_Database_Mini_.zip

servlet_To_Applet_Mini


DownloadLink:

http://rapidshare.com/files/96374051/SErvlet_To_Applet_Mini_.zip

Simple_Key_Mini


DownloadLink:

http://rapidshare.com/files/96374056/Simple_Key_Mini_.zip

Text_Demo_Mini


DownloadLink:

http://rapidshare.com/files/96374066/Text_Demo_Mini_.zip

Textarea_Demo_Mini

DownloadLink:

http://rapidshare.com/files/96374071/Textarea_Demo_Mini_.zip

UDP_Server_Mini


DownloadLink:
http://rapidshare.com/files/96374079/UDP_Server_Mini_.zip

UDPClient_Mini


DownloadLink:

http://rapidshare.com/files/96374088/UDPClient_Mini_.zip

Window_Events_Mini

DownloadLink:

http://rapidshare.com/files/96374100/Window_Events_Mini_.zip

Advertising Agency

The Software Functions

User Applications
Advertising Details
Advertising users
Net Charges
Flight Desclogout

DownloadLink:
http://rapidshare.com/files/96377710/Advertising_Agency.zip

Books Online Shopping

The Software Functions

User Applications
Create New account
Software
Hardware
Book Categories
Music
Mail

DownloadLink:
http://rapidshare.com/files/96377767/Books_online_shopping.zip

BugTracking System


DownloadLink:
http://rapidshare.com/files/96378011/BugTracking_system.zip

College Management Sysyetm


DownloadLink:
http://rapidshare.com/files/96378030/College_Management_Sysyetm.zip

Doctors

The Software Performance

1Users
Doctors
Patients
Hospitals
Medical Quiz
Change Password

DownloadLink:
http://rapidshare.com/files/96378056/Doctors.zip

Human Resource Management System


DownloadLink: http://rapidshare.com/files/96378126/human_resource_management_system.zip

Internet Banking

The Software Performance

Loging
add member
statement
loan
Transaction
query
logout

DownloadLink:
http://rapidshare.com/files/96378145/Internet_Banking.zip

Intranet Chatting

Intranet Chatting
This Project Entitled as INTRANET CHATTING is used basically for chatting purpose with the remote clients or users on Internet or local networks. Here in this project a java client / server combination is used to chat with remote users. When a Client wants to chat with a user on a remote host, he sends a request to the Server with a identification name like chat-id, the server responds to the request by identifying the client-id which is already registered in the server domain and when matched his request is granted and the client can begin to chat with the remote users present on the internet or local network.

DownloadLink:
http://rapidshare.com/files/96378245/Intranet_Chatting.zip

Java_Mail_Filter


DownloadLink:
http://rapidshare.com/files/96378263/java_mail_filter.zip

MIS Coding Nokia Soft


DownloadLink:
http://rapidshare.com/files/96378312/MIS_coding_Nokia_soft.zip

Online Cources


DownloadLink:
http://rapidshare.com/files/96378366/online_cources.zip

Online Exam


The Software Performance

Loging
examination
exam rules
student Report
subjectlist
answerlist
logout

DownloadLink:
http://rapidshare.com/files/96378374/Online_Exam.zip

Power Point Sliding


DownloadLink:
http://rapidshare.com/files/96378582/power_point_Sliding.zip

Practical_Aircraft_Position


DownloadLink:
http://rapidshare.com/files/96378686/Practical_Aircraft_Position.z

project planning management


DownloadLink: http://rapidshare.com/files/96378730/PROJECT_PLANNING_MANAGEMENT.zip

Puyo Puyo game

Discription: 1) Spheres(puyos) come down from the top of the game board in pairs. A player can move(left & right & down) and rotate them on their way down.
2) Spheres come in 4 different colors: red, blue, green, and yellow
3) Linking four or more spheres of the same color (horizontally, vertically or both(as in tetris)) removes them from the game board, allowing any sphere remaining to drop and fill the vacated space. This may lead to several possible "chain combos" if additional colors match.
4) The scoring is depends on the number of same color spheres forming tetris or chain combo and numberof chain combos formed at a single time. More the number more the score.
5) The level of the game automatically increased in the game progress depending on the number of spheres removed till.

DownloadLink:
http://rapidshare.com/files/96378749/Puyo_game.zip

Sliding Window Protocol

Discription: Routing Algorithm is Part of the network layer software responsible for deciding which
output line an incoming packet should be transmitted on.
If the subnet uses datagrams internally,the decision must be made for each data packet.
If the subnet uses virtual circuits internally, routing decisions are made only when a new virtual circuit is being set up.


download link:
http://rapidshare.com/files/96378813/Sliding_Window_Protocol.zip

Telephone Billing system

Discription:The Software Functions

User Applications
Create New account
login
Billing
Etc



Download link:
http://rapidshare.com/files/96378860/Telephone_Billing_System.zip

Voice over internet protocol

Discription: This s/w is designed to provide support for voice communications using Internet protocol over internet at low cost with high quality of service. This is called VOIP. The feasibility of carrying voice and call signaling messages over Internet has already been demonstrated but delivering high quality commercial products and establishing public services has just begin. VOIP can be defined as the ability to make telephone calls over the IP-based data n/ws with a suitable Qos at low cost. Voice communications will certainly remain a basic form of interaction for all of us. The PSTN simply can not be replaced in a short period. The immediate Goal of VOIP service providers is to reproduce existing telephone capabilities at low cost and to offer a technically competitive alternative to the PSTN.


Download link

http://rapidshare.com/files/96378881/Voice_Over_Internet_protocol.

Banking Application























Description: Application to implement a Banking system that has the following details for a current account customer:
ľ Account Name
ľ Account Number
ľ Sort Code
The system also provides the following services to a customer:
ľ Opening an account
ľ Depositing money in an account
ľ Withdraw money from an account with the condition that the customer cannot withdraw more money than the amount that is present in the account
ľ Ask for a balance of the account
ľ Provide a mini statement showing a maximum of the last 10 transactions
ľ Close an account
ľ The customer can open a joint account that can be shared by 3 people
ľ The customer can have an overdraft of $5000
Assumptions
The program does not save the data of a customer permanently. Thus all data related to a particular session is deleted once the application ends.
The task does not require the application to be a multi user application thus the application is started by opening an account and ended by closing that particular account.



//main
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

//BANKS CLASS INHERITS FROM THE JFRAME CLASS AND IMPLEMENTS ACTIONLISTENERS INTERFACE
public class Banks extends JFrame implements ActionListener{

//DECLARATION SECTION

//DECLARING IMAGEICONS FOR THE BUTTONS
private ImageIcon image1;
private ImageIcon image2;

private ImageIcon image3;
private ImageIcon image4;

private ImageIcon image5;
private ImageIcon image6;

//DECLARING COMPONENTS
private JButton openButton, depositButton, withDrawButton, balanceButton, miniStaButton, closeButton;
private JToolBar bar;
private JTextArea txtTextArea;
private JScrollPane scrBarForTextArea;

//DECLARING THE DIMENSIONS FOR THE BUTTONS
private Dimension buttonSize = new Dimension(200,50);

//DECLARING COLOR THAT ARE TO BE USED
private Color blue = new Color(10,110,255);
private Color white = new Color(255,255,255);

//DECLARING THE FONTS
private Font head = new Font("Castellar",Font.ITALIC,17);

//DECLARING VARIABLES
private String strTemp=null;
private String strAmount = "";
private float amount = 0;

//CREATING OBJECTS OF OTHER CLASSES
private Account current = new Account();
private JAccount joint = new JAccount();

//CONSTRUCTOR FOR THE BANKS CLASS
public Banks(){
super("GENIUSDIP'S BANKS");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container con = getContentPane();
con.setLayout(new BorderLayout());
con.add(getScrBarForTextArea(),BorderLayout.CENTER);

JToolBar bar = new JToolBar(SwingConstants.VERTICAL);

//ADDING BUTTONS TO THE TOOL BAR
bar.add(getOpenButton());
bar.add(getDepositButton());
bar.add(getWithDrawButton());
bar.add(getBalanceButton());
bar.add(getMinaStaButton());
bar.add(getCloseButton());

//DISABLING SOME BUTTONS
setAllBtnsEnabled(false);

//ADDING ACTION LISTENERS TO ALL THE BUTTONS
addActionListenerAllBtns();

//ADDING THE BAR TO THE CONTENT PANE
con.add(bar,BorderLayout.WEST);
}

//FUNCTION THAT RETURNS A TEXTAREA WITH SOME PROPERTIES SET
private JTextArea getTxtTextArea(){
if(txtTextArea==null){
txtTextArea=new JTextArea(10,10);
txtTextArea.setBackground(white);
txtTextArea.setForeground(blue);
txtTextArea.setEditable(false);
txtTextArea.setFont(head);
txtTextArea.setText("\t Geniusdip's Banks \n\n");
}
return txtTextArea;
}


//FUNCTION THAT RETURNS A SCROLLPANE WITH SOME PROPERTIES SET
private JScrollPane getScrBarForTextArea(){
if(scrBarForTextArea==null){
//VIEWING THE TEXTAREA FROM THE SCROLLPANE
scrBarForTextArea=new JScrollPane(getTxtTextArea());
}
return scrBarForTextArea;
}

//FUNCTION THAT RETURNS A BUTTON WITH SOME PROPERTIES SET
private JButton getOpenButton()
{
if(openButton==null)
{
ImageIcon image1 = new ImageIcon("OPENANACCOUNTANI.gif");
openButton=new JButton("",image1);
openButton.setPreferredSize(buttonSize);
}
return openButton;
}

//FUNCTION THAT RETURNS A BUTTON WITH SOME PROPERTIES SET
private JButton getDepositButton()
{
if(depositButton==null)
{
ImageIcon image2 = new ImageIcon("DEPOSIT.gif");
depositButton=new JButton("",image2);
depositButton.setPreferredSize(buttonSize);
}
return depositButton;
}

//FUNCTION THAT RETURNS A BUTTON WITH SOME PROPERTIES SET
private JButton getWithDrawButton()
{
if(withDrawButton==null)
{
ImageIcon image3 = new ImageIcon("WITHDRAW.gif");
withDrawButton=new JButton("",image3);
withDrawButton.setPreferredSize(buttonSize);
}
return withDrawButton;
}

//FUNCTION THAT RETURNS A BUTTON WITH SOME PROPERTIES SET
private JButton getBalanceButton()
{
if(balanceButton==null)
{
ImageIcon image4 = new ImageIcon("BALANCE.gif");
balanceButton=new JButton("",image4);
balanceButton.setPreferredSize(buttonSize);
}
return balanceButton;
}

//FUNCTION THAT RETURNS A BUTTON WITH SOME PROPERTIES SET
private JButton getMinaStaButton()
{
if(miniStaButton==null)
{
ImageIcon image5 = new ImageIcon("MINI.gif");
miniStaButton=new JButton("",image5);
miniStaButton.setPreferredSize(buttonSize);
}
return miniStaButton;
}


//FUNCTION THAT RETURNS A BUTTON WITH SOME PROPERTIES SET
private JButton getCloseButton()
{
if(closeButton==null)
{
ImageIcon image6 = new ImageIcon("CLOSE.gif");
closeButton=new JButton("",image6);
closeButton.setPreferredSize(buttonSize);
}
return closeButton;
}

//FUNCTION TO ENABLE OR DISABLE BUTTONS
private void setAllBtnsEnabled(boolean bool){
getDepositButton().setEnabled(bool);
getWithDrawButton().setEnabled(bool);
getBalanceButton().setEnabled(bool);
getMinaStaButton().setEnabled(bool);
getCloseButton().setEnabled(bool);
}

//FUNCTION TO ADD ACTIONLISTENERS TO BUTTONS
private void addActionListenerAllBtns(){
getOpenButton().addActionListener(this);
getDepositButton().addActionListener(this);
getWithDrawButton().addActionListener(this);
getBalanceButton().addActionListener(this);
getMinaStaButton().addActionListener(this);
getCloseButton().addActionListener(this);
}

//FUNCTION TO SET VARIABLES TO POINT TO NOTHING
private void setVariables(){
strTemp=null;
strAmount = "";
amount = 0;
current = null;
joint = null;
}

//THE ACTION PERFORMED METHOD
//EXECUTES WHEN THE CLICK EVENT IS FIRED
public void actionPerformed(ActionEvent e){

Object source = e.getSource();

//OPEN BUTTON CLICKED
if(source==openButton){
String Name = "";
String ANumber = "";
String Name2 = "";
String Name3= "";

//QUERY THE USER FOR THE NEEDED INFORMATION
do
{
strTemp = JOptionPane.showInputDialog(null,"Please Enter C To Open A Current Account \n Or J To Open A Joint Account");
}while(strTemp==null || strTemp.length()==0);
switch(strTemp.charAt(0)){
case 'c':
case 'C':
//ENABLE ALL OTHER BUTTON EXCEPT THE OPEN BUTTON
setAllBtnsEnabled(true);
openButton.setEnabled(false);
do
{
Name = JOptionPane.showInputDialog(null,"Please Enter The Account Holder's Name");
}while(Name==null || Name.length()==0);
do
{
ANumber = JOptionPane.showInputDialog(null,"Please Enter The Account Number");
}while(ANumber==null || ANumber.length()==0);
current.openAnAccount(Name,ANumber,"Current Account");
txtTextArea.append("Current Account Created With The Following Details \n");
txtTextArea.append("Account Holder's Name:::" + current.getAccountName() + "\n");
txtTextArea.append("Account Number::::::::::" + current.getAccountNumber()+ "\n");
txtTextArea.append("Account Sort Code:::::::" + current.getSortCode()+ "\n");
break;
case 'j':
case 'J':
setAllBtnsEnabled(true);
openButton.setEnabled(false);
String choice = null;
do
{
choice = JOptionPane.showInputDialog(null,"Please Enter 2 If They Are 2 Account Holders For The Joint Account \n Or 3 If They Are 3 Account Holders For The Joint Account");
}while(choice==null || choice.length()==0);
switch(choice.charAt(0)){
case '2':
do
{
Name = JOptionPane.showInputDialog(null,"Please Enter The First Account Holder's Name");
}while(Name==null || Name.length()==0);
do
{
Name2 = JOptionPane.showInputDialog(null,"Please Enter The Second Account Holder's Name");
}while(Name2==null || Name2.length()==0);
do
{
ANumber = JOptionPane.showInputDialog(null,"Please Enter The Account Number");
}while(ANumber==null || ANumber.length()==0);
joint.openAnAccount(Name,Name2,ANumber,"Joint Account");
txtTextArea.append("Joint Account Created With The Following Details \n");
txtTextArea.append("First Account Holder's Name:::" + joint.getAccountName() + "\n");
txtTextArea.append("Second Account Holder's Name:::" + joint.getAccountName2() + "\n");
txtTextArea.append("Account Number::::::::::" + joint.getAccountNumber()+ "\n");
txtTextArea.append("Account Sort Code:::::::" + joint.getSortCode()+ "\n");
break;
case '3':
do
{
Name = JOptionPane.showInputDialog(null,"Please Enter The First Account Holder's Name");
}while(Name==null || Name.length()==0);

do
{
Name2 = JOptionPane.showInputDialog(null,"Please Enter The Second Account Holder's Name");
}while(Name2==null || Name2.length()==0);

do
{
Name3 = JOptionPane.showInputDialog(null,"Please Enter The Third Account Holder's Name");
}while(Name3==null || Name3.length()==0);

do
{
ANumber = JOptionPane.showInputDialog(null,"Please Enter The Account Number");
}while(ANumber==null || ANumber.length()==0);

joint.openAnAccount(Name,Name2,Name3,ANumber,"Joint Account");
txtTextArea.append("Joint Account Created With The Following Details \n");
txtTextArea.append("First Account Holder's Name:::" + joint.getAccountName() + "\n");
txtTextArea.append("Second Account Holder's Name:::" + joint.getAccountName2() + "\n");
txtTextArea.append("Third Account Holder's Name:::" + joint.getAccountName3() + "\n");
txtTextArea.append("Account Number::::::::::" + joint.getAccountNumber()+ "\n");
txtTextArea.append("Account Sort Code:::::::" + joint.getSortCode()+ "\n");
break;
default:
do
{
Name = JOptionPane.showInputDialog(null,"Please Enter The First Account Holder's Name");
}while(Name==null || Name.length()==0);

do
{
Name2 = JOptionPane.showInputDialog(null,"Please Enter The Second Account Holder's Name");
}while(Name2==null || Name2.length()==0);

do
{
Name3 = JOptionPane.showInputDialog(null,"Please Enter The Third Account Holder's Name");
}while(Name3==null || Name3.length()==0);

do
{
ANumber = JOptionPane.showInputDialog(null,"Please Enter The Account Number");
}while(ANumber==null || ANumber.length()==0); joint.openAnAccount(Name,Name2,Name3,ANumber,"Joint Account");
txtTextArea.append("Joint Account Created With The Following Details \n");
txtTextArea.append("First Account Holder's Name:::" + joint.getAccountName() + "\n");
txtTextArea.append("Second Account Holder's Name:::" + joint.getAccountName2() + "\n");
txtTextArea.append("Third Account Holder's Name:::" + joint.getAccountName3() + "\n");
txtTextArea.append("Account Number::::::::::" + joint.getAccountNumber()+ "\n");
txtTextArea.append("Account Sort Code:::::::" + joint.getSortCode()+ "\n");
}
break;
default:
setAllBtnsEnabled(true);
current = new Account();
do
{
Name = JOptionPane.showInputDialog(null,"Please Enter The Account Holder's Name");
}while(Name==null || Name.length()==0);
do
{
ANumber = JOptionPane.showInputDialog(null,"Please Enter The Account Number");
}while(ANumber==null || ANumber.length()==0);
current.openAnAccount(Name,ANumber,"Current Account");
txtTextArea.append("Current Account Created With The Following Details \n");
txtTextArea.append("Account Holder's Name:::" + current.getAccountName() + "\n");
txtTextArea.append("Account Number::::::::::" + current.getAccountNumber()+ "\n");
txtTextArea.append("Account Sort Code:::::::" + current.getSortCode()+ "\n");
}
//DEPOSIT BUTTON CLICKED
}else if(source==depositButton){
boolean success = false;
while(success == false){
try{
strAmount = JOptionPane.showInputDialog(null,"Please Enter The Amount To Deposit");
amount = Float.parseFloat(strAmount);
success = true;
}catch(Exception am){
JOptionPane.showMessageDialog(null,"Invalid Numerals Added");
}
}
switch(strTemp.charAt(0)){
case 'c':
case 'C':
current.deposit(amount);
txtTextArea.append(Float.toString(amount) + " Deposited Into Current Account \n");
break;
case 'j':
case 'J':
joint.deposit(amount);
txtTextArea.append(Float.toString(amount) + " Deposited Into Joint Account \n");
break;
}
//WITHDRAW BUTTON CLICKED
}else if(source==withDrawButton){
boolean success = false;
while(success == false){
try{
strAmount = JOptionPane.showInputDialog(null,"Please Enter The Amount To WithDraw");
amount = Float.parseFloat(strAmount);
success = true;
}catch(Exception amo){
JOptionPane.showMessageDialog(null,"Invalid Numerals Added");
}
}
switch(strTemp.charAt(0)){
case 'c':
case 'C':
String strTemp2 = current.withDraw(amount);
txtTextArea.append(strTemp2 + "\n");
break;
case 'j':
case 'J':
String strTemp3 = joint.withDraw(amount);
txtTextArea.append(strTemp3 + "\n");
break;
}
//BALANCE BUTTON CLICKED
}else if(source==balanceButton){
switch(strTemp.charAt(0)){
case 'c':
case 'C':
txtTextArea.append(Float.toString(current.askBalance()) + "\n");
break;
case 'j':
case 'J':
txtTextArea.append(Float.toString(joint.askBalance()) + "\n");
break;
}
//MINI STATEMENT BUTTON CLICKED
}else if(source==miniStaButton){
switch(strTemp.charAt(0)){
case 'c':
case 'C':
txtTextArea.append(current.askMiniStatement() + "\n");
break;
case 'j':
case 'J':
txtTextArea.append(joint.askMiniStatement() + "\n");
break;
}
//CLOSE BUTTON CLICKED
}else if(source==closeButton){
openButton.setEnabled(true);
switch(strTemp.charAt(0)){
case 'c':
case 'C':
current.closeAnAccount();
setVariables();
System.exit(0);
break;
case 'j':
case 'J':
//SET ALL VARIABLES TO POINT AT NOTHING
joint.closeAnAccount();
setVariables();
//EXIT THE SYSTEM
System.exit(0);
break;
}
txtTextArea.setText("\t Geniusdip's Banks \n\n");
}

}

//MAIN METHOD
public static void main(String[] args){
Banks fram=new Banks();
fram.setBounds(0,0,900,500);
fram.show();
}



}


//CLASS ACCOUNT TO HANDLE CURRENT ACCOUNT
class Account{
private String accountName="", accountNumber="", sortCode="";
private Transaction trans = new Transaction();
private float amountDeposited=0, amountWithDrawn=0, currentBalance=0;
private int x=0;

//PUBLIC PROPERTY TO GET ACCOUNT NAME
public String getAccountName()
{
return accountName;
}

//PUBLIC PROPERTY TO GET ACCOUNT NUMBER
public String getAccountNumber()
{
return accountNumber;
}

//PUBLIC PROPERTY TO GET SORT CODE
public String getSortCode()
{
return sortCode;
}

//PUBLIC PROPERTY TO SET ACCOUNT NAME
public void setAccountName(String accountName)
{
this.accountName = accountName;
}

//PUBLIC PROPERTY TO SET ACCOUNT NUMBER
public void setAccountNumber(String accountNumber)
{
this.accountNumber = accountNumber;
}

//PUBLIC PROPERTY TO SET SORTCODE
public void setSortCode(String sortCode)
{
this.sortCode = sortCode;
}

//FUNCTION TO OPEN AN ACCOUNT
public void openAnAccount(String accountName, String accountNumber, String sortCode)
{
this.setAccountName(accountName);
this.setAccountNumber(accountNumber);
this.setSortCode(sortCode);
}

//FUNCTION TO DEPOSIT
public void deposit(float amountDeposited){
trans.depositInToAccount(amountDeposited,x);
x++;
}

//OVERLOADED FUNCTION TO WITHDRAW WITH ONE ARGUMENT
public String withDraw(float amountWithDrawn){
String strWD="";
if(trans.queryCurrentBalance()>=amountWithDrawn){
trans.withDrawFromAnAccount(amountWithDrawn,x);
x++;
strWD=Float.toString(amountWithDrawn) + " Amount Withdrawn";
}else{
strWD="Insufficient Funds In Account";
}
return strWD;
}

//OVERLOADED FUNCTION TO WITHDRAW WITH 2 ARGUMENTS
public String withDraw(float amountWithDrawn, float overDrawnAmount){
trans.withDrawFromAnAccount(amountWithDrawn,x);
x++;
return Float.toString(overDrawnAmount);
}

//FUNCTION TO RETURN CURRENT BALANCE
public float askBalance(){
float balance = trans.queryCurrentBalance();
return balance;
}

//FUNCTION TO RETURN MINI STATEMENT
public String askMiniStatement(){
String strStatement = trans.showMiniStatement();
return strStatement;
}

//FUNCTION TO CLOSE AN ACCOUNT
public void closeAnAccount()
{
setAccountName(null);
setAccountNumber(null);
setSortCode(null);
trans = null;
}

//FUNCTION THAT RETURNS THE NEXT TRANSACTION NUMBER
public int getX(){
x++;
return x;
}
}



//CLASS TRANSACTIONS FOR ALL THE BANKING TRANSACTIONS
//INCLUDING ASK BALANCE, DEPOSIT, WITHDRAW & MINI STATEMENT
class Transaction{


private float amountDeposited=0, amountWithDrawn=0, currentBalance=0;
private float[] transactionAmount = new float[10];
private int[] transactionNumber = new int[10];
private String[] transactionType = new String[10];

public void depositInToAccount(float amountDeposited, int transactionNumber) throws IndexOutOfBoundsException
{
try{
if(amountDeposited>0)
{
this.amountDeposited = amountDeposited;
this.currentBalance = this.currentBalance + amountDeposited;
if(transactionNumber > 9){
for(int i=0;i<9;++i){> 9
//ALL THE ELEMENTS SHOULD GO ONE STEP BACK WARDS
//THE FIRST ELEMENT IS DELETED
this.transactionNumber[i] = this.transactionNumber[i+1];
this.transactionType[i] = this.transactionType[i+1];
this.transactionAmount[i] = this.transactionAmount[i+1];
}
//THE NEW ELEMENT IS ADDED AT THE END
this.transactionNumber[9] = transactionNumber;
this.transactionType[9] = "Deposited";
this.transactionAmount[9] = amountDeposited;
}else{
//ELSE JUST ADD IT AT THE INDEX SPECIFIED
this.transactionNumber[transactionNumber] = transactionNumber;
this.transactionType[transactionNumber] = "Deposited";
this.transactionAmount[transactionNumber] = amountDeposited;
}
}
}catch(IndexOutOfBoundsException a){

}
}

//WITHDRAW FROM ACCOUNT FUNCTION
public String withDrawFromAnAccount(float amountWithDrawn,int transactionNumber)
{
String strWithDraw="";
currentBalance = currentBalance - amountWithDrawn;
if(transactionNumber > 9){
//REINITIALIZE THE ARRAY IF THE TRANSACTION NUMBER IS > 9
//ALL THE ELEMENTS SHOULD GO ONE STEP BACK WARDS
//THE FIRST ELEMENT IS DELETED
for(int i=0;i<9;i++){ str="Transaction Number \t Transaction Type \t Transaction Amount \n" i =" 0;i<="9;++i){" str =" str" accountname2="" accountname3="" accountname2 =" accountName2;" accountname3 =" accountName2;" strwd="" test =" askBalance()-amountWithDrawn;">=0){
strWD=super.withDraw(amountWithDrawn);
}else if(test>=-5000 & test<0){
super.withDraw(amountWithDrawn,test);
strWD="Amount Withdrawn Utilized Over Draft Facility";
}else{
strWD="Insufficient Funds In Account Even With Over Draft Facility";
}
return strWD;
}

//FUNCTION TO CLOSE THE ACCOUNT
public void closeAnAccount(){
setAccountName2("");
setAccountName3("");
super.closeAnAccount();
}
}
END