You are on page 1of 69

1

1.1 Abstract

“Hostel Management Information System” should maintain all the


Hostel Student information. The Hostel environment consists of students,
Fee, Room etc so the Hostel Management information system should
maintain details of all students ie., their bio-data ,their personal Information
etc. Fee details like Room rent ,Mess ,Management ,amount etc and also
details like Room to which a particular student belong, their attendance,
their Refund etc.

Therefore it is obvious that system maintains vast amounts of data. In


such cases computerization of the system is inevitable. The ideal reasons for
computerizing Hostel Management system are as follows.

2
PROJECT DESCRIPTION

This project deals with the Hostel Management System. This project
is having different modules like new Student information creation form ,Fee
information form, Attendance and Room Allotments forms.
This was submitted with One modules given below
1). Login Option:
If the user already contains an account in this system, this form
permit to enter in to this Hotel Management system. Now he can use all the
facilities provided by this Mailing System.
User Menu: Provides a way to give any commands to the Hostel
Management System, the options include in the menu are
1. Student
2. Fee Details
3. Room Allotment
4. Attendance
5. Refunds
6. Reports
7. Exit
1. Student: This screen having option to enter entire details of student and
have an option to save the Details. The fields in this screen are:
Studen ID: It is Uniquely identified by the each student
Stuname: Student Name.
Age: Age of the Student .
Address : Address of the student
Mobile: Mobile number of the student

3
2). Fee: If the user selects this option on the user menu the corresponding
Fee details of the user will be displayed. To read the different fields, one
option is provided as a save by clicking on the save button .
3) Attendance: Using these options the user can selects Attendance option ,
different student id’s will be available , if u want a particular student id
select one of them from the drop down list and enter corresponding details ,
finally save it by clicking save button.
4) Room Allotment: By clicking this option one more screen will be
displayed on the screen is Room Allotment screen. This screen can be used
to add new details to the database system. Here various listings of room with
the room number and there floor name. Here we have various options.
Save: User to save the details of the student.
Modify: This option is used to update any student room allotment
information.
5) Refund: By selecting options menu one more screen will be displayed,
the screen is Refund amount Screen. This form will contains all information
about balance amount, amount payee by the student and also fine details for
a particular student. It contains following providers
Save: User to save the details of the student.
6)Reports:- By selecting this option menu new screen will be displayed,
the screen will provide option to show details of the All student, student and
fee details reports.
All Student: when we click on this button, it display all the student
details in the Hostel and their personal details..
Student: when we click on this button, it display all the particular
student details based on student id’s.

4
1.2 ORGANIZATION PROFILE:

Sri Chandrasekharendra Saraswathi Viswa Maha Vidyalaya, Enathur,


Kanchipuram is the brain child of his Holiness Sri Jayendra saraswathi
Swamigal,the sankaracharya of kanchi kamakoti petam. The status of the
university was conferred on this Institution in 1993. Sri Chandrasekharendra
Saraswathi Viswa Maha Vidyalaya University,is being sponsored by Sri
Kanchi Kamakoti Peetam charitable Trust.

The University started functioning for 1994-95 academic years with


very limited resources,but with in a short span of five years,it has equipped
itself adequately to run M.B.A., M.C.A., B.E. programs successfully.The
rapid progress of the University shows the dedication of the employees,
faculties in training the students,active participation of the Authorities and
guidelines and blessing of his Holiness.

A largest library in Asia is in Sri Chandrasekharendra Saraswathi Viswa


Maha Vidyalaya University Library. It is located at Enathur four kms from
the Kanchipuram, South India,is one of the premises University of India
named after the 68th Acharya of Sri Kanchi Kamakoti Peetam,Sri
Chandrasekharendra saraswathi Swamigal whose name is bestowed on the
Maha Vidhyala has cherished a desire ti revive Kanchipuram to its prestige
glory as a center of learning.

5
6
1.3 EXISTING SYSTEM

The existing system is a manually maintained system. All the Hostel


Student details are entered into records manually.

Separate records are to be maintained for the details of each student, Fee
details, Room Allocation , Attendance etc. All these details are entered and
retrieved manually.

In such a system, if a particular student’s is to be known, first track the


identification number, then look in for the Room number he is stay in and
based on that check for the Attendance and Refund record or related record.

1.4 Limitations of existing system:

As described earlier the existing manually maintained system is subject to


many errors and disadvantages.The main disadvantages are as follows:

 Time Consuming: Retrieval of required data takes much time as the


data is put at several places and one has to browse through many files
to get even a small piece of data. Also the updating process,
preparations of reports manually are all very time consuming.
 Inaccuracy: Maintenance of vast data manually has many chances of
inaccuracy of data.

7
1.5 PROPOSED SYSTEM

The Proposed system is the computerized version of the existing


system. It rectifies most of the pitfalls of the existing system and
maintains databases of all the entities participating in the system.

Computerization provides easy and quick access over the data.


Authorization schemes like giving passwords, encoding data can be used
to maintain data security. Also data cannot be lost due to natural
disasters.

Java has been chosen for this project because Java applications are
portable across a wide range of platforms and operating systems. Java
AWT controls provide tools to develop the package to be efficiently used
by the end users.

8
9
2.1 Hardware Requirements

Processor : Pentium

RAM : 512MB

Hard Disk : 4GB

CD Drive : LG

Monitor : LG Monitor

Keyboard : Logitech

2.2 Software Requirements

Language : JAVA

Operating System : Windows XP Professional

Software : JAVA (Swings)

Tool : Command Prompt

Database : Oracle 8.0

10
SOFTWARE DESCRIPTION
JAVA FEATURE

The inventors of Java wanted to design a language, which would offer


solutions to some of the problems encountered in modern programming.
They wanted the language to be reliable, portable and distributed but also
simple, compact and interactive. Sun Microsystems officially describes Java
with the following attributes:

 Compiled and Interpreted


 Platform-Independent and Portable
 Object-oriented
 Robust and Secure
 Distributed
 Familiar, Simple and Small
 Multithreaded and Interactive
 High Performance
 Dynamic and Extensible
These features have made java the first application language of the World
Wide Web.
 Compiled and Interpreted:
Usually a computer language is either compiled or interpreted. Java
combines both these approaches thus making Java a two-stage
System. First Java compiler translates the source code into what is
known as the byte code instructions. Byte codes are not machine
instructions and therefore, in the second stage, Java interpreter

11
generates machine codes that can be directly executed by the machine
that is running the Java program. we can thus say that Java is both a
compiled and interpreted language.

 Platform-independent and Portable:-

The most significant contribution of java over other languages is its


portability. Java programs can be easily moved from one computer
system to another, anywhere and anytime. we can download a Java
applet from a remote computer onto out local system via Internet and
execute it locally. Java ensures portability in two ways. First, Java
compiler generates byte code instructions that can be implemented on
any machine. Secondly, the sizes of the primitive data types are
machine-independent.

 Simple, Small and Familiar:-

Java is a small and simple language .java does not use pointers,
preprocessor header files, go statements and many others. It also
eliminates operator overloading multiple inheritance. Familiarity is
another striking feature of java. Java is a simplified version of c++.

 Multithreaded and Interactive:-

Multithreaded means handling multiple tasks simultaneously. Java


supports multithreaded programs.

12
This feature greatly improves the interactive performance of graphical
applications.

 High Performance:

Java’s performance is impressive for an Interpreted language, mainly


due to the use of intermediate byte code. Java architecture is also
designed to reduce overall overheads during runtime .The
incorporate of multithreaded enhances the overall execution speed of
java programs.

 Dynamic and Extensible:

Java is a dynamic language. Java is capable of linking in new class


libraries, methods and objects. Java programs support functions
written in other languages such as c and c++. These functions are
known as native methods.

13
ABOUT ORACLE
Data base technology has been described as one of the most rapidly
growing areas of computer and information science. It is know exaggeration
to say that many thousands of organizations have become critically
dependent on the continued and successful operations of a database system.

Overview OF RDBMS

RDBMS is the acronym for Relational Database Management


System. A relational database is an extremely simple way of thinking
about and managing data used in a business. The most famous RDBMS
packages are Oracle , Sybase and Informix.

Introduction to Oracle

Oracle is the most widely used database in the world. It runs on


virtually every kind of computer. Oracle is an object-relational database.
Oracle8 (object Relational Database Management System) offers
capabilities of both relational and object-oriented database systems.
Objects can be defined as reusable software codes, which are location
independent and perform a specific task on any application environment
with little or no change to code.

14
Oracle products are based on a concept known as the ‘Client/Server
Technology’. This concept involves segregating the processing of an
application between two systems. One performs all activities related to
the database and the other performs activities that help the user to interact
with the application.

The database server or backend is used to manage the database tables


optimally among the multiple clients who concurrently request the server
for the same data. It also enforces data integrity across all the client
applications and controls database access and other security
requirements.

TOOLS FOR ORACLE:

The tools provided by Oracle are so users friendly that a person with
minimum skills in the field of computers can access them with ease. The
main tools are following:

 SQL*PLUS
 PL/SQL
 Forms
 Reports

SQL*PLUS

15
SQL*PLUS is a structured Query Language supported by Oracle. Through
SQL * PLUS we can store, retrieve, edit enter and SQL commands and
PL/SQL blocks. Using SQL * Plus we can perform calculations, list column
definitions for any tale and can also format query result in the form of a
report.

PL/SQL

PL/SQL is an extension of SQL. PL/SQL block can contain any number of


SQL statements integrated with flow of control statements. Thus PL/SQL
combines the data manipulating power of SQL with data processing power
procedural languages.

FORMS

This is a graphical tool used for generating and executing Forms based
application. A form basically comprises blocks and fields. Multiple tables
can be accessed over a single form, based on the application with the help of
transaction commands. Oracle Forms Builder is the design component of
Oracle Forms.

REPORTS
It is an application development tool for Oracle for developing, executing,
displaying and printing reports. We can create a wide variety of reports,
which have various modes.

16
17
3.1 Overall System Design Structure

Login

Student Fee Details Room


Attendance Refund Reports
Information Allotment

Student Info

New Modify Delete

18
Fee

New
Old

Reports

Student Fee Details Balance

3.2 DATA FLOW DIAGRAM

Data Flow Diagram graphically represents the flow of data


through system and services as a model of system. It identifies the
path that data take the processes that cause data and its final
destination.

19
Logical DFD’s are also found to be easier since they show the
sequence of transmission or conversation of data by different process
of the system.

DFD Symbols:

In DFD there are four symbols.

- Terminator defines a source or


destination of system data.

- Arrow identifies data-flow data in


motion. It is a pipeline through
which information flow.

- Circle represents a process that


transforms incoming data flows
into outgoing data flow(s).

- An open rectangle is a data store.

20
Use Case Diagrams:-

STUDENT INFO

FEE DETAILS

DATABASE
ROOM DETAILS

ATTENDANCE

REPORTS

21
UML DIAGRAMS:-

Level :0 Login

Level : 1
Student
Fee Room Refund AttenDance
Level:2

Student Fee Room


Student id, student Student id, Total amt, Student id, Room No,
name, age, gender, Balance ,date Floor Number
mobile Public void Fee Public void Room
Public void Student Public void setup Public void setup
Public void setup Public void action Public void action
Public void action

Refund
Attendance
Student id, Total amt,
Balance ,fine, date Student id, Total days,
Public void Refund Present and absent days
Public void setup Public void Attendance
Public void action Public void setup
Public void action

22
3.4 Database Design:-

Table Name: Student

FIELD DATA SIZE CONSTRAINTS DESCRIPTION


NAME TYPE
Stuid number 10 Primary Key Student ID
Stuname Varchar 15 Not null Student Name
Fname Varchar 15 Not null Father Name
Age Number 2 Not null Age
Hostel Varchar 15 Not null Hostel Name
Gender Varchar 6 Not null Gender
Mob Varchar 10 Not null Mobile Number
Dat Date Not null Date of Join

Table Name: Fee


FIELD DATA SIZE CONSTRAINTS DESCRIPTION
NAME TYPE
Stuid Number 10 Foreign Key Student ID
No_mon Number 2 Not null No. of Months
Total_amt Number 7,2 Not null Total Amount
Date_Of_pay Date Not null Date of pay
Amt_pay Number 7,2 Not null Amount Pay
Balance Number 7,2 Not null Balance

Table Name: Room


FIELD DATA SIZE CONSTRAINTS DESCRIPTION
NAME TYPE
Stuid Number 10 Foreign Key Student ID
Course Varchar2 5 Not null Course Name

23
Room_No Number 2 Not null Room Number
Floor Varchar2 1 Not null Floor Name

Table Name: Attend


FIELD DATA SIZE CONSTRAINTS DESCRIPTION
NAME TYPE
Stuid Number 10 Foreign Key Student ID
Total_days Number 3 Not null Total Days
Present_days Number 3 Not null Present Days
Absent_days Number 3 Not null Absent Days

Table Name: Address


FIELD DATA SIZE CONSTRAINTS DESCRIPTION
NAME TYPE
Stuid Number 10 Foreign Key Student ID
Door_No Varchar2 15 Not null Door No
City Varchar2 10 Not null City
State Varchar2 15 Not null State
Pin code Number 7 Not null Pincode

24
Hostel Main Form:-

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

public class Hostel extends JFrame implements ActionListener


{

JButton b1,b2,b3,b4,b5,b6,b7;
JLabel l1;

25
public Hostel()
{
super("Hostel Management System");
setup();
addWindowListener(new WindowEventHandler());
setVisible(true);
}
public void setup()
{
setLayout(null);
l1=new JLabel("Hostel Management System");
l1.setFont(new Font("Monotype Corsiva",Font.ITALIC,25));
l1.setBounds(250,100,400,25);
l1.setForeground(Color.red);
b1=new JButton("Student Info");
b1.setBounds(150,200,150,25);
b2=new JButton("Room Allotment");
b2.setBounds(150,250,150,25);
b3=new JButton("Fee Details");
b3.setBounds(450,200,150,25);
b4=new JButton("EXIT");
b4.setBounds(300,380,150,25);
b5=new JButton("Attendance");
b5.setBounds(450,250,150,25);
b7=new JButton("Refund");
b7.setBounds(150,300,150,25);
b6=new JButton("Reports");
b6.setBounds(450,300,150,25);
add(l1);add(b1);add(b2);add(b3);add(b5);add(b4);add(b6);add(b7);
setBackground(Color.cyan);
setForeground(Color.black);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
b6.addActionListener(this);
b7.addActionListener(this);
setSize(800,600);
}

26
public static void main(String s[])
{
Hostel h=new Hostel();
}

public void actionPerformed(ActionEvent ae)


{
String sst=ae.getActionCommand();
if(sst.equals("Student Info"))
{
dispose();
Stu st=new Stu();
}
else if(sst.equals("Room Allotment"))
{
dispose();
Room r=new Room();
}
else if(sst.equals("Fee Details"))
{
dispose();
Feedet f=new Feedet();
}
else if(sst.equals("Attendance"))
{
dispose();
Attend a=new Attend();
}
else if(sst.equals("EXIT"))
{
System.exit(0);
}
else if(sst.equals("Reports"))
{
dispose();
new Report();
}
else if(sst.equals("Refund"))
{

27
dispose();
new Refund();
}
}

class WindowEventHandler extends WindowAdapter


{
public void windowClosing(WindowEvent we)
{
System.exit(0);
}
}
}

Student Registration Form:-

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

public class Student extends JFrame implements ActionListener

28
{
JLabel l1,l2,l3,l4,l5,l6,l7,l8,l,l9,l10,ld;
JLabel an,as,ast,pin;
JTextField t2,t3,t4,t6,t7;
JTextField a1,a2,a3;
TextArea ta1;
JButton b1,b2,b3;
Choice ch,ag,ch1,ch2;
String
mon[]={"Jan","Feb","Mar","Apr","May","Jun","July","Aug","Sep","Oct","
Nov","Dec"};

Connection con;
Statement st;

public Student()
{
super("Student Info");
setup();
addWindowListener(new WindowEventHandler());
setVisible(true);
}
public void setup()
{
setLayout(null);
l1=new JLabel("Student Registration Form");
l1.setFont(new Font("Monotype Corsiva",Font.ITALIC,25));
l1.setBounds(280,50,200,25);
l1.setForeground(Color.red);

setFont(new Font("Courier",Font.BOLD,15));
l2=new JLabel("Student ID");
l2.setBounds(70,120,100,25);
t2=new JTextField();
t2.setBounds(240,120,180,25);
l3=new JLabel("Student Name");
l3.setBounds(70,160,120,25);
t3=new JTextField();
t3.setBounds(240,160,200,25);
l4=new JLabel("Father's Name");

29
l4.setBounds(70,200,140,25);
t4=new JTextField();
t4.setBounds(240,200,200,25);
l5=new JLabel("Age");
l5.setBounds(70,240,160,25);

l6=new JLabel("Address");
l6.setBounds(70,280,160,25);

an=new JLabel("House No");


an.setBounds(240,300,160,25);
a1=new JTextField();
a1.setBounds(300,300,100,25);

as=new JLabel("City");
as.setBounds(420,300,160,25);
a2=new JTextField();
a2.setBounds(470,300,100,25);

ast=new JLabel("State");
ast.setBounds(240,350,160,25);
ch2=new Choice();
ch2.setBounds(300,350,100,25);
ch2.add("");
ch2.add("Andhra Pradesh");
ch2.add("TamilNadu");
ch2.add("Karnataka");

pin=new JLabel("Pincode");
pin.setBounds(420,350,160,25);
a3=new JTextField();
a3.setBounds(470,350,100,25);

l7=new JLabel("Mobile");
l7.setBounds(70,400,160,25);
l8=new JLabel("Gender");
l8.setBounds(500,240,200,25);
t6=new JTextField();
t6.setBounds(240,400,200,25);

30
b1=new JButton("Save");
b1.setBounds(200,450,100,25);
b2=new JButton("Cancel");
b2.setBounds(340,450,100,25);
b3=new JButton("Clear");
b3.setBounds(480,450,100,25);

l=new JLabel("*");
l.setVisible(false);
l10=new JLabel("* Invalid Values");
l10.setBounds(20,30,200,25);
l10.setVisible(false);

ld=new JLabel("Date");
ld.setBounds(500,120,100,25);
t7=new JTextField();
t7.setBounds(550,150,120,25);

ch=new Choice();
ch.add("Male");
ch.add("Female");
ch.setBounds(550,260,100,25);

ag=new Choice();
ag.add("");
for(int i=0;i<=100;i++)
ag.add(""+i);
ag.setBounds(240,240,70,25);

l9=new JLabel("Hostel Name");


l9.setBounds(500,180,100,25);
ch1=new Choice();
ch1.add("");
ch1.add("Vishalakhshi");
ch1.add("Annapoorni");
ch1.setBounds(550,210,150,25);

Calendar cal=Calendar.getInstance();

31
String dat=cal.get(Calendar.DATE)+"/"+mon[cal.get(Calendar.MONTH)]
+"/"+cal.get(Calendar.YEAR);
t7.setText(""+dat);
t7.setEditable(false);

add(l);
add(l1);add(l2);add(l3);add(l4);add(l5);add(l6);add(t2);
add(t4);add(t3);add(l7);add(t6);add(an);add(a1);add(as);
add(a2);add(ast);add(a3);add(pin);add(ch2);
add(b1);add(b2);add(l8);add(ch);add(ag);add(l10);add(ch1);
add(l9);add(t7);add(b3);add(ld);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
setBackground(Color.cyan);
setSize(800,600);
}

public void actionPerformed(ActionEvent ae)


{

String sst=ae.getActionCommand();
if(sst.equals("Save"))
{
String id=t2.getText();
String nam=t3.getText();
String fname=t4.getText();
String age=ag.getSelectedItem();
String hname=ch1.getSelectedItem();
String gender=ch.getSelectedItem();
String mob=t6.getText();
//Double a=Double.parseDouble(id);
String da=t7.getText();
String no=a1.getText();
String str=a2.getText();
String pin=a3.getText();
String sta=ch2.getSelectedItem();

if(id.length()==0){

32
JOptionPane.showMessageDialog(null,"invlaid ID");}
else if(nam.length()==0){
JOptionPane.showMessageDialog(null,"invlaid Student name number");}
else if(fname.length()==0){
JOptionPane.showMessageDialog(null,"invlaid Father name");}
else if(age.length()==0){
JOptionPane.showMessageDialog(null,"invlaid age");}
else if(hname.length()==0){
JOptionPane.showMessageDialog(null,"invlaid hostel name");}
else if(gender.length()==0){
JOptionPane.showMessageDialog(null,"invlaid gender");}
else if(no.length()==0){
JOptionPane.showMessageDialog(null,"invlaid Door number");}
else if(str.length()==0){
JOptionPane.showMessageDialog(null,"invlaid city");}
else if(sta.length()==0){
JOptionPane.showMessageDialog(null,"invlaid State");}
else if(pin.length()==0){
JOptionPane.showMessageDialog(null,"invlaid pincode");}
else if(pin.length()!=6){
JOptionPane.showMessageDialog(null,"pincode havaing 6 numbers");}
else if(mob.length()!=10){
JOptionPane.showMessageDialog(null,"invlaid Mobile number");}

else
{
int n=0;
if(n==0)
{
try
{
int an=Integer.parseInt(id);
n=1;
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Enter numbers only in
ID");
}
}

33
if(n==1)
{
try
{
Long an=Long.parseLong(mob);
n=2;
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Enter numbers only in
Mobile field");
}

}
if(n==2)
{
int len=nam.length();
char s[]=nam.toCharArray();
for(int i=0;i<len;i++)
{
if(Character.isDigit(s[i]))
{
JOptionPane.showMessageDialog(null,"Enter text only in name
field");
i=len;
n=2;
}
else
n=3;
}
}
if(n==3)
{
int le=fname.length();
char s[]=fname.toCharArray();
for(int i=0;i<le;i++)
{
if(Character.isDigit(s[i]))
{

34
JOptionPane.showMessageDialog(null,"Enter text only father name
field");
i=le;
n=3;
}
else
n=4;
}
}
if(n==4)
{
try
{
int an=Integer.parseInt(pin);
n=5;
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Enter numbers only
pincode");
}
}
if(n==5)
{

try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

con=DriverManager.getConnection("jdbc:odbc:Hostel","ramesh","rams");
st=con.createStatement();
st.executeUpdate("insert into student
values("+id+",'"+nam+"','"+fname+"',"+age+",'"+hname+"','"+gender+"',"+
mob+",'"+da+"')");
st.executeUpdate("insert into address
values("+id+",'"+no+"','"+str+"','"+sta+"',"+pin+")");
JOptionPane.showMessageDialog(null," Record insert sucessfully");
con.close();
st.close();
dispose();

35
new Hostel();
}
catch(Exception e)
{
System.out.println("SqlException Caught:"+e);
JOptionPane.showMessageDialog(null," sql Error is occured");
}

}
}
}

else if(sst.equals("Cancel"))
{
dispose();
Stu st=new Stu();
}
else if(sst.equals("Clear"))
{
t2.setText("");
t3.setText("");
t4.setText("");
t6.setText("");
a1.setText("");
a2.setText("");
a3.setText("");

}
}
public static void main(String s[])
{
Student stt=new Student();
}

class WindowEventHandler extends WindowAdapter


{
public void windowClosing(WindowEvent we)
{
dispose();
new Hostel();

36
}
}

Fee Information Form:-

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

public class Fee extends JFrame implements ActionListener,FocusListener


{
JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,ld;
JTextField t2,t3,t4,t5,t6,t7,t8,t9,t10,td;
JTextArea ta1;
JButton b1,b2,b3;
Choice ch;
String
mon[]={"Jan","Feb","Mar","Apr","May","Jun","July","Aug","Sep","Oct","
Nov","Dec"};
Choice ch2,ch1;
Connection con;
Statement st;
ResultSet rs;

public Fee()
{
super("Fee Information");
setup();
addWindowListener(new WindowEventHandler());
setVisible(true);
}
public void setup()
{

37
setLayout(null);
l1=new JLabel("Fee Information");
l1.setFont(new Font("Monotype Corsiva",Font.ITALIC,25));
l1.setBounds(250,50,400,25);
l1.setForeground(Color.red);

setFont(new Font("Courier",Font.BOLD,15));
l2=new JLabel("Student ID");
l2.setBounds(70,120,100,25);
/*t2=new JTextField();
t2.setBounds(240,120,180,25);*/
ch2=new Choice();
ch2.setBounds(240,120,180,25);
ch2.add("");

l3=new JLabel("Room Rent");


l3.setBounds(70,160,100,25);
t3=new JTextField();
t3.setBounds(240,160,60,25);
t3.setText("9000");
t3.setEditable(false);

l4=new JLabel("Mess");
l4.setBounds(360,160,60,25);
t4=new JTextField();
t4.setBounds(430,160,60,25);
t4.setText("6000");
t4.setEditable(false);

l5=new JLabel("Hostel Management");


l5.setBounds(70,200,160,25);
t5=new JTextField();
t5.setBounds(240,200,60,25);
t5.setText("2000");
t5.setEditable(false);

l6=new JLabel("No of Months");


l6.setBounds(360,200,100,25);
t6=new JTextField();

38
t6.setBounds(520,200,40,25);

l10=new JLabel("Others");
l10.setBounds(70,240,100,25);
t10=new JTextField();
t10.setBounds(240,240,60,25);
t10.setText("9000");
t10.setEditable(false);

l7=new JLabel("Total Amount");


l7.setBounds(70,280,120,25);
t7=new JTextField();
t7.setBounds(240,280,80,25);

l8=new JLabel("Amount Pay");


l8.setBounds(70,330,120,25);
t8=new JTextField();
t8.setBounds(240,330,80,25);

l9=new JLabel("Balance");
l9.setBounds(360,320,80,25);
t9=new JTextField();
t9.setBounds(450,320,80,25);

ld=new JLabel("Date");
ld.setBounds(500,120,100,25);
td=new JTextField();
td.setBounds(550,120,120,25);

Calendar cal=Calendar.getInstance();
String dat=cal.get(Calendar.DATE)+"/"+mon[cal.get(Calendar.MONTH)]
+"/"+cal.get(Calendar.YEAR);
td.setText(""+dat);

b1=new JButton("Save");
b1.setBounds(200,450,100,25);
b2=new JButton("Cancel");

39
b2.setBounds(340,450,100,25);
b3=new JButton("Clear");
b3.setBounds(480,450,100,25);

add(l1);add(l2);add(l3);add(l4);add(l5);add(l6);add(l7);add(l9);add(l8);add(l
10);
add(ch2);add(t3);add(t4);add(t5);add(t10);add(t6);add(t7);add(t9);add(t8);
add(b1);add(b2);add(b3);
add(ld);add(td);
td.setEditable(false);
t8.addFocusListener(this);
t6.addFocusListener(this);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
setBackground(Color.cyan);
setSize(800,600);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:Hostel","ramesh","rams");
st=con.createStatement();
rs=st.executeQuery("select stuid from student");
while(rs.next())
{
int a=rs.getInt(1);
ch2.add(""+a);
}
}
catch(Exception e)
{
System.out.println(e);
JOptionPane.showMessageDialog(null,"Sql error occured");
}

public void focusLost(FocusEvent f)


{
if(f.getSource()==t8)

40
{
int b=Integer.parseInt(t7.getText())-Integer.parseInt(t8.getText());
t9.setText(""+b);
}
else if(f.getSource()==t6)
{ int res=Integer.parseInt(t3.getText())+Integer.parseInt(t4.getText())
+Integer.parseInt(t5.getText())+Integer.parseInt(t10.getText());
int mon=Integer.parseInt(t6.getText());
res=(res*mon)/6;
t7.setText(""+res);

}
}
public void focusGained(FocusEvent fe)
{

public void actionPerformed(ActionEvent ae)


{
String sst=ae.getActionCommand();
if(sst.equals("Save"))
{
String id=ch2.getSelectedItem();
String mon=t6.getText();
String total=t7.getText();
String pay=t8.getText();
String bal=t9.getText();
String dat=td.getText();

if(id.length()==0){
JOptionPane.showMessageDialog(null,"invlaid ID");}
else if(mon.length()==0){
JOptionPane.showMessageDialog(null,"invlaid Months");}
else if(pay.length()==0){
JOptionPane.showMessageDialog(null,"invlaid amount pay");}
else
{

41
int n=0;
if(n==0)
{
try
{
int an=Integer.parseInt(mon);
n=1;
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Enter numbers only in
month field");
}
}
if(n==1)
{
try
{
int an=Integer.parseInt(pay);
n=2;
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Enter numbers only in
Paying amt");
}
}
if(n==2)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

con=DriverManager.getConnection("jdbc:odbc:Hostel","ramesh","rams");
st=con.createStatement();
st.executeUpdate("insert into fee
values("+id+","+mon+","+total+",'"+dat+"',"+pay+","+bal+")");
JOptionPane.showMessageDialog(null," Record insert sucessfully");
con.close();
st.close();

42
dispose();
new Hostel();
}
catch(Exception e)
{
System.out.println("SqlException Caught:"+e);
JOptionPane.showMessageDialog(null," sql Error is occured: "+e);
}
}
}
}
else if(sst.equals("Cancel"))
{
dispose();
new Hostel();
}
else if(sst.equals("Clear"))
{
t6.setText("");
t7.setText("");
t8.setText("");
t9.setText("");
ch.select(0);
}
}

public static void main(String s[])


{
Fee f=new Fee();
}

class WindowEventHandler extends WindowAdapter


{
public void windowClosing(WindowEvent we)
{
System.exit(0);
}
}
}

43
44
45
Login Form

46
Hostel Main Form

47
Student Information form

48
Student Registration Form

49
Student Updating Form

50
Student Deletion Form

51
Fee Information Form

52
Student Installment Pay form

53
Room Allotment Form

54
Student Attendance Form

55
Refund Amount Form

56
57
Student Report

58
Student Fee Report

59
Student Information Report

60
4.1 METHODOLOGY USED FOR TESTING
System testing is aimed at ensuring that the system works accurately and
efficiently before live operation commences. The system should be test data,

61
specifically designed to show that the system will operate successfully in all
aspects and produce expected result under expected condition. The system tests
data and the results of processing are maintained throughout the operational life of
the system for audit purpose or test any subsequent amendments.

System testing is a critical element of software quality assurance and


represents the ultimate review of specifications, design and coding. Testing is a
process of executing program with the intention of finding error. A good test is
one, which has a high probability of finding undiscovered errors. In other words,
possible aim of testing is to find faults in the software.

Module Testing
Module testing is a process of testing the system module by module, what
are all the input given and what are all the output produced and whether they are
required by testing in this method.
We would be very clear of the bugs occurred. The project matrimonial is
tested module wise.

Unit Testing
In this testing we test each module individually and integrate with the
overall system. Unit testing focuses verification efforts on the smallest unit
software design in the module. This is also known as module testing is carried out
during programming stage itself. The fields are validated for perfect working of
the project. In this step each module is found to working satisfactorily as regard to
the expected output from the module. There are some validation checks for fields
also. For example validation is done for verifying the data input given by the user,
which both the formats and validating of the data entered. It is very easy to find
error and debug the system.

Integrated Testing

62
Data can be lost across an interface one module can have an adverse effort
on the other sub functions, when combined, may not produce the desired major
functions. Integration testing is the systematic testing for constructing the uncover
errors within the interface. The testing was done with sample data. The developed
system has run successfully for this sample data. The need for integrated is to find
the over all system performance.

Validation Testing
At the culmination of the block box testing, software is completely
assembled as a package, interfacing errors have been uncovered and corrected and
a final series of software tests that is validation tests begins validation testing can
be defined in many ways but a simple definition is that validation succeeds when
the software functions in a manner that can be reasonably expected be the
customer the project is validated.

4.2 SYSTEM IMPLEMENTATION

63
Implementation is one of the most important tasks in project development.
Implementation is the phase, in which one has to be cautious because all the
errors undertaken during the project will be fruitful only if the software is
properly implemented according to the plans made.
The implementation phase is less creative than system design. It is
primarily concerned with user training site preparation and file conversion. This
project can be implemented in efficient and user-friendly manner by using the
controls.

 For description, Label Boxes are used.

 In order to get inputs, Text Boxes are used.

 Drop down List Boxes are used for selecting one input from multiple
choices.

 Command buttons are used to perform necessary action.

 Data controls are used where ever necessary.

 A data Grid, which is one of the feature’s of Java, is used to prepare


reports.

 JDBC is used in order to connect database and queries.

Depending on the nature of the system, extensive user training may be required.
Programming itself is a design work. The initial parameters of the Management
Kit should be modified as a result of programming efforts; programming provides
a reality test from the assumptions made by the analyst.

The major elements of the implementation plans are as follows:

64
 Test plans

 Training plans

 Equipment Installation plans

 Conversation of Installation plans

 Conversation plans

65
5. CONCLUSION

The project titled as "Hostel Management Information


System " been designed with much care, with the intention easier

66
and the more complexity involved is presented in a simple and
lucid style.

The Hostel Management System works in a similar fashion


as that of an Hotel Management System. The various Department
student information is to be stored and retrieve any time when
required.

67
68
7. BIBLIOGRAPHY

References:

 Java Network Programming 2nd Edition – Merlin


Hughes,Michael Shoffner, Derek Hamner –
http://nitric.com/jnp/ -- Network Specific Java
Programming
 Thinking in Java 2nd Edition – BruceEckel –
http://www.BruceEckel.com – Java Programming
§
 Java 2 Black Book – Steven Holzner – Swing

 Sun's Java Tutorial --


http://java.sun.com/docs/books/tutorial – Swing and
Updated Methods
 Complete reference java 2 - TATA McGraw HILL

Websites:

http://www.BruceEckel.com – Java Programming


§ http://nitric.com/jnp/ -- Network Specific Java
Programming
http://java.sun.com/docs/books/tutorial – Swing and Updated
Methods

69