Wednesday, August 5, 2009
Saturday, July 25, 2009
DATABASE SIMULATION JAVA PROJECT (SOURCE CODE)
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
Friday, July 10, 2009
COMPUTER SECURITY AND AIR TRAFFIC AUTOMATION
which should coexist in close association with few, if any,
problems. Safety and security have often shared office space.
Yet, when these two disciplines met not too long ago, a strong
opposition to computer security within the air traffic automation
community was voiced. What were their concerns and could they be
overcome? Can we have an advanced automated air traffic system
and still meet the safety concerns of both the controllers and
system engineers as well as the computer security demands of the
new Public Law?
Public Law 100-235, The Computer Security Act of 1987, helped to
clarify the identification process of "sensitive, unclassified
systems." The first system so labeled within the Federal
Aviation Administration (FAA) was the "Air Traffic Control
System." Security had been an integral part of the planning for
the new advanced automation system. Yet, when the system design
was still very young, automated security found itself outside
looking in and wondering "what went wrong and how can we fix it?"
Identification of the problem was easy. Everyone asked was quick
to say that security had been bumped by a fear that inclusion of
a security package may deny access to a controller or system
engineer in a time of urgent need. The solution was just as
obvious.
"denial of service. However, before I even finished introducing
myself at my first meeting with the air traffic automation folks,
I quickly discovered that one other element was needed - computer
security education.
My presentation will stress the need for proper computer security
education and up-front inclusion of automated information systems
security measures.
Develop a,,security package that would not cause such a
FAA National AIS Security Program Manager
Steve Smith is the National AIS Security Program Manager for the
FAA. As such, he assists in the development of an AIS risk
analysis methodology applicable to AIS and telecommunications
networks throughout the FAA as well as serving as the action
officer for the FAA AIS Security program. Mr. Smith is actively
involved in the AIS Security for the Advanced Automation System
(AAS) which will gradually replace the existing air traffic control
system through the year 2000. He is a graduate of St. Martins
University in Lacey, Washington with a Degree in Information
Systems Management. Mr. Smith is an active member of ISSA
'(National Capital chapter) and CSI. Mr. Smith has published
numerous articles on computer security for the FAA timesharing
management newsletter and FAA management digests.
Theorem proving and software engineering
software engineering
is a timely report on a rapidly expanding research area. The
purpose of this brief introduction is to indicate the potential
role of such systems in software engineering.
It is widely accepted that there is a crisis in software develop
ment: projects are difficult to estimate, frequently overrun,
and result in systems which have many errors and are difficult
to use. In fact, the crisis is one of the design task being beyond
the ad hoc methods used. As the scale of integration of hardware
increases, the design task is again becoming the critical
bottleneck. In such a crisis there is a danger that quack
remedies are offered. Peter Naur has likened the situation to
that in George Bernard Shaw‘s ‘Widowers‘ houses‘, where
almost any change is one for the better. Are mathematical
methods a panacea or a quack remedy? Neither! There are, in
fact, many useful approaches which will make contributions
to various application and/or development environments.
Specialist (’fourth-generation’) languages, Prolog, functional
languages, prototyping and others all have a contribution to
make.
What are ‘formal methods’? Typically they use a mathematically
based notation in which to record specifications and,
based on these, they have a notion of an implementation
satisfying a specification which is susceptible to proof. Specifications
can be as precise as the final code which implements
them but can also be far shorter and more tractable. One
technique is to use pre- and post-conditions which state properties
of the results required without indicating how they are
to be achieved. Another, probably more important, technique
is to describe the intended function in terms of data objects
which match the problem rather than the implementation
language or machine. A short specification written in mathematical
notation can be checked for (some forms of) internal
consistency. More importantly, it can be used as a precise
reference point for the justification of design. If such design
is undertaken step by step, the ability to detect errors early can
result in an increase in productivity.
There are three major approaches into which most formal
methods can be divided. That which fits the normal development
route most closely is to fix a specification notation but
to record design by bringing in features of the implementation
language. Such design steps give rise to ‘proof obligations’
which are sentences in a logical language: their discharge
justifies the design. An alternative approach is to make the
initial description a very clear, but probably hopelessly inefficient,
algorithm. This is transformed in a series of steps to a
workable program. Each transformation step is an instance of
one 0f.a number of general rules. A few of these are universal;
most have applicability conditions which again result in
proof obligations. A third, newer, approach extracts algorithms
from constructive proofs of the existence of a result satisfying
a specification.
Putting aside the differences between approaches, it is clear
that each needs proofs. Other related formal methods also
need proofs of theorems (for example verifying, against a
denotational semantics, that transformations do preserve
equivalence; justifying inference rules).
The formal development of a system might give rise to many
proof obligations. Each such proof obligation is a putative
theorem which needs proof; it might be long, but its proof is
likely to be rather shallow. An ideal would be an oracle to
which each such expression was offered: an answer of ‘yes,
theorem’ or ’no, falsifiable’ would be the sought for response.
It can be proved that no algorithm to play the part of this
oracle can be produced for reasonably rich theories. At the
other extreme, the most modest requirement would be for a
system to which one provided the expression and a list of
steps which was claimed to constitute a complete proof. This
time, the program is not difficult to write, but the detail required
in preparing its input makes it almost unusable. The
most realistic target is probably a program which has useful
places for the human and the machine.
Completely checked machine proofs have been produced
only for very small programs. By contrast, formal specifications
are now being used in leading-edge industrial companies and
have been written for some of the largest programming
languages in use. The verification systems discussed by Lindsay
will lead on to others with wider applicability. Software
engineers of the future will use these tools (on critical applications)
in the same way that engineers in other disciplines use
mathematics thought too complex by the first ‘pragmatic’
practitioners.
Monday, June 22, 2009
Outsourcing NEWI's computer provision
Outsourcing NEWI's computer provision
What are the advantages and disadvantages of outsourcing NEWIs computing provison. What management, organisation and technology issues are to be considered in making and outsourcing decision?
Enterprise Networking - several projects
Enterprise Networking - several projects
Locate a business that could benefit from using the internet. Develop an internet strategy for that business, looking at what internet capabilities should be used (e-mail, Usenet, LISTSERV, chatting, telnet, FTP, Gophers, Archie, Veronica, WAIS, WWW etc), technical requirements(hardware, software, network components, open systems, information portability, interoperability, TCP/IP, ISDN etc), and how the Internet could change the company's business model.
Investigate problems posed by enterprise networking and the internet and recommend solutions:
Connectivity issues, loss of management and control over systems, the need to carefully manage organisational change,difficulty of ensuring network reliability and security, controlling hidden costs of client/server and internet computing.
Intranet applications - several projects ( at least 10!)
Intranet applications - several projects ( at least 10!)
In many businesses the ability to capture, share, distribute and utilise corporate knowledge is a critical success factor and it is claimed that intranet technology has the power to improve business performance dramatically. It is claimed that over 70% of major corporations have, or currently are developing, at least one intranet application.
To achieve the business benefits that intranet use can bring, it is necessary to address the management and organisational issues that go hand in hand with intranet use, as well as the technology itself.
There are several projects here involving both technical and management issues:
Issues such as knowledge management, cultural change, behavioural issues, training requirements, information management, HR implications, technical implementation issues.
This involves research for example in:
What an intranet is., primary purposes, Intranets, internet, extranets, internet tools and methods, groupware, WWW
How leading companies are using intranet technology to boost their business performance. Who they are, what have they done, what problems they have encountered.
Key business implementation issues which can make or break intranet success.
Many companies adopt intranet technology and assume it is a simple extension of information management, it isn’t. What changes in process, culture, technology, infrastructure are necessary for effective intranet use?
How intranets compare with similar and alternative systems - reference librarires, e-mail, groupware and WWW
Frameworks for effective knowledge management - intranets are gradually emerging as the dominant technology for effective knowledge sharing and creating. Many organisations rely on an information infrastructure which does not encourage comunication and collaboration. To achieve the maximum business benefits intranets must be usedand managed within an information management architecture which has its foundations in knowledge sharing. How can this be achieved?
Intranet design choices - identify the features of basic intranets designed for information dissemination, more advanced applications with information gathering and collaboration capabilities, more elaboarte intranets designed as business support systems. Provide practical guidelines on how you can match intranet design features to business objectives.
Essential technical implementation issues - technical issues including client hardware and software, server hardware and software, search engines, discussion servers and groupware servers, network standards and capabilities, protocols, user access: intranets, extranets and the internet, design trade offs: choice of hardware, web server, browser, push swrver, e-mail client and server, groupwre servers, development tools, security, insourcing, outsourcing , support requirements, main success factors etc
What the future holds for intranet applications - intranet technology is not standing still. Product and service providers are constantly updating their products and services to capitalise on new capabilities. Who are the companies at the cutting edge of intranet use, what are the future trends and capabilities? Extranets - merging of intranets and internet commerce, EDI, e-commerce
Carry out research and produce case studies focussing on companies using intranets from basic information dissemination to full business process support. Answer questions such as:
What was the implementation time frame?
To what extent was there custom development?
Were there any sepecial infrastructure requirements?
What were the most significant security issues and how were they dealt with?
Who is responsible for content and how much effort is required?
How was user training handled
What costs have resulted from the intranet?
What was done to encourage use?
Investigate the intranet applications market to produce product profiles of intranet related tools, facts figures and guidance to make intranet choices and decisions. Companies and products such as:
Lotus :InterNotes, Domino, Smartsuite,Weblicator
Microsoft: Exchange server, netmeeting, Office 97, Internet Information server, Internet Explorer, Frontpage
Netscape Communications Corporation: Netscape Navigator Gold, Netscape Communicator, Fast Track Server
Novell: Intranetware, Groupwise
Oracle: Oracle applications for the web, Oracle Interoffice
Another angle might be to concentrate on a particular sector, eg financial services, retail, education etc.
Virtual offices - several projects
Some organisations(Cisco Systems, Ernst & Young, IBM, BA) are eliminating offices and allowing employees to work from any location they like. Some employees are supposed to work in "virtual offices" - in any place such a car, plane, train or home where they can get work done. Non territorial offices, hot desking, hoteling , teleworking are just some of the ideas in the "virtual office". Virtual offices cut down costs reduce travel time employees have more flexibility and control over there time. But is the virtual office a better way of working? What is its impact on individual identity, worker satisfaction, and corporate community? Does it lead to downsizing , part time working, loss of jobs? How does it effect productivity, morale? What management, organisation, and technology issues must be addressed when converting to a virtual office? Can all companies use virtual offices?
Telecommunications applications that can provide competitive advantage to organisations.
Using information systems for strategic advantage increasingly depends on telecommunications technology and applications such as e-mail, voice mail, fax, digital information services, teleconferencing, dataconferencing, electronic data interchange (EDI) and groupware. Firms should develop strategic telecommunication plans to ensure that their telecommuniations systems serve business objectives and operations.
Investigate the ways that telecommunications technology can provide a firm with a competitive advantage. What management, organisation and technology factors would you consider to develop a strategic telecommuication plan?.
Videoconferencing on the internet
The internet has opened many news ways for people to communicate, and videoconferencing is one of the most exciting. One leading internet videoconferencing tool is CU-SeeMe. Who is using it, and for what purpose? What business processes can be streamlined through videoconferencing? What management, organisation and technology factors would you consider to decide whether to use Internet based videoconferencing.
Reviving the centralisation versus decentralisation debate
Along standing issue among IS managers has been the question of centralisation. Should processing power and data be distributed to departments and divisions, or should they be concentrated at a central location? Enterprise networking facilitates decentralisation, but the use of network computers and Java favours a centralised model. Which is the best for an organisation? How does an IS manager make sure that the computing model they select is the right one?
Interactive web applications
Interactive web applications
Review the most common techniques & software applications available to produce interactive web applications.
Develop an internet based shopping cart prototype that could be configured to a retail specific environment eg Amazon.
Digital Certificates: An investigation into encryption and authentication techniques.
Digital Certificates are at the forefront of Internet security technology as a means of authentication. This proposed project will research, investigate and implement this new technology.
Card Game Player
Card Game Player
A system to play a reasonably complex card game requiring skill and judgement. Ideally, the system will be sufficiently flexible to play a range of similar games and may involve the use of 'AI' learning techniques to dynamically adapt its behaviour.
My Garden on the Web
My Garden on the Web
The growth of television programs and magazines about garden design shows how many people are eager:
To browse through other people's gardens.
To show how they have created their own garden.
For this project you will build a tool which enables someone to build a web-site about how they transformed their garden.
My House on the Web
My House on the Web
The growth of television programs and magazines about interior decoration shows how many people are eager:
To browse through other people's homes
To show how they have decorated their own homes.
For this project you will build a tool which enables people to build a web-site about the interior decor of their home.
Image Morphing
Image Morphing
The technique of image `morphing' (slowing blending of one image into another) is widely used in the media. The technique of transforming one image into another using a combination of image warping and colour fading has become increasingly popular in films and TV. The project will develop a `morphing' program.
Typically these programs require the user to draw a grid over the source and destination images to define the mapping between them. This program will allow the user to pick out the control-points and regions using mouse-clicks in the usual manner.
Most programs only allow interpolative morphing (producing images lying between the two images) even though extrapolative morphing (producing an image that extends 'beyond' one of the control images) is technically possible. An additional aim of the project might be to write a morphing program which allows both interpolative and extrapolative morphing to be done using arbitrary pairs of images.
Statistical Literary Analysis
Statistical Literary Analysis
One method of approaching text in a computational way is to compute the relative probabilities that a word will follow a previous word, or that a word will follow a group of words. This often reveals important stylistic information about the piece. For example, it can show whether two texts have the same author, or whether a given text (such as the Bible) was a collaborative effort. This project will consist of reviewing previous approaches to statistical literary analysis, writing a general program to perform this task, and then applying the program to a text or group of texts with the hope of revealing new insights about these work(s).
Environment Control
Environment Control
Microprocessor-based environmental control system for use within a greenhouse to control heat, light, water and nutrients based around PIC microprocessor.