1.1 Abstract
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:
5
6
1.3 EXISTING SYSTEM
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.
7
1.5 PROPOSED SYSTEM
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
CD Drive : LG
Monitor : LG Monitor
Keyboard : Logitech
Language : JAVA
10
SOFTWARE DESCRIPTION
JAVA FEATURE
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.
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++.
12
This feature greatly improves the interactive performance of graphical
applications.
High Performance:
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
Introduction to Oracle
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 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
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 Info
18
Fee
New
Old
Reports
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:
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
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:-
23
Room_No Number 2 Not null Room Number
Floor Varchar2 1 Not null Floor Name
24
Hostel Main Form:-
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
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();
}
27
dispose();
new Refund();
}
}
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.*;
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);
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);
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);
}
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();
}
36
}
}
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import java.sql.*;
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("");
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);
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);
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");
}
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)
{
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);
}
}
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.
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.
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.
Drop down List Boxes are used for selecting one input from multiple
choices.
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.
64
Test plans
Training plans
Conversation plans
65
5. CONCLUSION
66
and the more complexity involved is presented in a simple and
lucid style.
67
68
7. BIBLIOGRAPHY
References:
Websites:
69