Sei sulla pagina 1di 54

PROJECT REPORT ON

Advanced Student Attendance System Using RFID

SUBMITTED BY
<<NAMES OF GROUP MEMBERS>>
MCA 6TH SEMESTER

ACADEMIC YEAR 2013-2014

PROJECT GUIDE
<<GUIDE NAME>>

SUBMITTED TO
UNIVERSITY OF MUMBAI

VIDYALANKAR SCHOOL OF INFORMATION TECHNOLOGY


WADALA (E) PCP CENTER,
INSTITUTE OF DISTANCE & OPEN LEARNING (IDOL)
UNIVERSITY OF MUMBAI, MUMBAI 400037.

Advanced Student Attendance System Using RFID

SUBMITTED BY
<<NAMES OF GROUP MEMBERS WITH SEAT NOS>>

DATE OF SUBMISSION
<<date>>

Submitted in partial fulfillment of the requirements for qualifying MCA,


Sem VI- examination

VIDYALANKAR SCHOOL OF INFORMATION TECHNOLOGY


WADALA (E) PCP CENTER,
INSTITUTE OF DISTANCE & OPEN LEARNING (IDOL)
UNIVERSITY OF MUMBAI, MUMBAI 400037.

Acknowledgement
I would like to thank to Prof <NAME>,who not only served as my supervisor but
also encouraged and challenged me throughout my Project. He patiently guides me
throughout the process, never accepting less than my best efforts.
Besides my supervisor, I would like to thank my friends from computer science
department for his valuable support in Our Project software. Last, but not the least, I
would like to thank my parents for giving me life in the first place, for educating me
with aspects from both arts and sciences, for unconditional support and
encouragement to pursue my interests and for all the things they have done for me.

VIDYALANKAR SCHOOL OF INFORMATION TECHNOLOGY


WADALA (E) PCP CENTER,
INSTITUTE OF DISTANCE & OPEN LEARNING (IDOL)
UNIVERSITY OF MUMBAI, MUMBAI 400037.

// include here IDOL emblem and delete this line //

Project certificate for MCA students

This is to certify that the project entitled

___<<project title>>___by

Mr./Ms._________<<students name>>___ Seat no. __________________in


partial fulfillment of MCA degree (Sem VI) examination had not been
submitted for any other examination and does not form any other course
undergone by the candidate.

Internal Guide

Internal examiner

External Examiner

Co-ordinator

Principal

College Seal

STATEMENT BY THE CANDIDATE

I wish to state that the work embodied in this project titled Student
Attendance System Using RFID forms my own contribution to the
project work carried out under the guidance of Prof. X.Y ABCD. This work
has not been submitted for any other degree of this or any other University.
Wherever references have been made to previous work of others, it has been
clearly indicated as such and included in the Bibliography.

Signature of the candidate

Certified by

Signature of the Guide


Date

Include Certificate of the company /organization(if any)

Synopsis of the project


Title:- Student Attendance System Using RFID
Modules:1.Registration of Student
In this module admin will register new student. student entry Will be done in this
module. Student registration is the main module in this project.
2.Assign Rfid To Student
In this module admin will assign rfid no to each student. assign rfid to each new
student entry Will be done in this module.
3.Attendence
In this module admin will fill attendance of each student those who has got their
assign rfid.attendence will be done Automatically and no fraud will happen in doing
attendance.
4.Report Generation
In this module admin can view generated attendance reports.

Technology:Front End:-Core Java, Advanced Java, JSP


Back End:-MySql

Table of contents
Sr. No.
1
1.1
1.2
2
2.1
2.2
2.3
2.4
2.5
3
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
4
5
6
7
8
9
10
11
12
13

Topic
Introduction
Organizational profile (Write in short)
Introduction to project
System study and analysis
Problem definition
Feasibility
System analysis
Current system
Proposed system
System development
Gantt chart
Event table
Use Case diagram
Sequence diagram / Collaboration diagram
Activity diagram
Class Diagram
State chart diagram
Component diagram
Deployment diagram
Menu tree
Program list
Table list
Report list
System testing and conclusion
Data entry form
Coding conventions
Source code
Screen layout with test data and test results
Report layouts
References/ bibliography/websites used
Annexure

Page. No.
10
11
12
13
16
17
18
20
21
22
24
25
26
27
28
28
30
32
33
34
35
36
37
40
42
43
45
50
53
54

i
ii

iii
iv
v

Brief background of the organization where the


student has developed the project
Data dictionary This should give a catalogue of the
data elements used in the system/sub system
Data name, aliases if any, length (size), type numeric,
alpha, binary etc.
List of abbreviations, figures, tables
References: bibliography, websites used
Soft copy of the project on CD

1.Introduction

Radio Frequency Identification (RFID) technology is a smart object tracking and


automated data collection solution RFID is a technology that uses radio waves to transfer
data from an electronic tag, called RFID tag or label, attached to an object, through a
reader for the purpose of identifying and tracking the object. RFID technology which is a
matured technology that has been widely deployed by various organizations as part of
their automation systems. In this research, an RFID based system has been built in order
to produce a time-attendance management system. RFID systems consist of two main
components: Transponder (tag) located in the object for identification, and Interrogator
(or reader), which allows the data transfer to and from the transponder. This system
consists of two main parts which include: the hardware and the software. The hardware
consists of the motor unit and the RFID reader. The RFID reader, which is a lowfrequency reader, is connected to the host computer via a serial to USB converter cable.
The Time- Attendance System (Graphic User Interface) GUI was developed using Java
The Time-Attendance Management System provides the functionalities of the overall
system such as displaying live ID tags transactions, registering ID, deleting ID, recording
attendance and other minor functions. This interface is housed in the host computer.
Monitoring Boarding school student movement using the old fashioned study
system is inefficient and brings difficulty to the hostel management to check attendance
manually.
By using RFID technology, student movement is quick and easy. This project is to
develop an embedded system, which will record the attendance of the student using RFID
card based system and the data should be stored in the personal computer. The RFID tags
enable school management to track the students movements in and out of the hostel or
school.

1.1 Organizational profile (Write in short)

1.2 Introduction to project

The existing conventional attendance system requires students to manually sign


the attendance sheet every time they attend a class. As common as it seems, such system
lacks automation, where a number of problems may arise. This includes the time
unnecessarily consumed by the students to find and sign the name on the attendance
sheet; some students may mistakenly or purposely sign another student's name. Also the
attendance sheet may get misplaced .Having a system that can automatically capture
student's attendance by flashing their student card at the RFID reader can really save all
the mentioned troubles. This is the main motive of our system and in addition having an
online system accessible anywhere and anytime can greatly help the Admin to keep track
of their students' attendance. Looking at a bigger picture, deploying the system
throughout the academic faculty will benefit the academic management as students'
attendance to classes is one of the key factor in improving the quality of teaching and
monitoring their students' performance. Besides, this system provides valuable online
facilities for easy record maintenance offered not only to lecturers but also to related
academic management staffs especially for the purpose of students' progress monitoring .
RFID based systems are going to revolutionize the entire Attendance systems. In
this project we are going to School Attendance system, which will track the Childs,
whether they come in time or late so that admin user will get the instant information.
RFID can be used Attendance circulation operations and fake attendance
detection systems. RFID-based systems move beyond security to become tracking
systems that combine security with more efficient tracking of materials throughout the
school, including easier and faster charge and discharge, inventorying, and materials
handling.

2 System study and analysis

Block diagram & Network diagram of the system


The application is a Divided into Two Modules Desktop Based And web based
application. So when we deploy it will have a server where all the web pages reside. All
the data is stored in the database. The Client accesses this data using internet. The
database is accessed via Server and the application works in the browser. To access the
application in the browser, the user must have a valid RFID and he needs to swipe it in
front of the RFID Scanner. The block diagram of system is shown in fig . RFID Scanner
being plug and play can be replaced very easily without affecting the current application
and there would be no data losses as there is no hardware storage involved in terms of the
RFID Scanner.

Server
Module

System
Module
RFID
Reader

Database

So as far as the system implementation is concerned, we have to develop a web


application in JSP And Servlet with MYSQL Database as the backend. The RFID
scanner acts as a tool to provide input in the form of attendance to the system. The
advantage here is that the storage and intelligence is handled by the system itself; so even
a basic scanner will work perfectly alright for the system.

RFID Scanner
RFID Scanner is a plug-play USB device that has only one task If a valid task is
swiped in front of the scanner, the RFID tag is read and its unique code is pasted on any
text field on the active window of the screen.

Database
Database of the application is MYSQL Server. So the database file is of type .SQL
System Module
On the System Module the application is loaded as a Software. So on the client
side, the only role is of the Read Data From Reader as Reader is Connected to it. The
application runs on the System with proper authentication and authorization.
Server
Apache Tomcat Server is where all the web-pages reside. It consists of all the
codes into two sets. One is the design side of the code and the other one is the actual
coding. So page extensions are .jsp and .java. The directory is divided accordingly for
protection and security. Whenever, the client requests a data, the server serves it. If at all,
the data is required, then itll retrieve from the database and send it as http stream to the
browser. At the browser level, the product turns into html for rendering the data.

System Specification:

Operating System

Windows XP/7
Front-end: Java JDK 1.7
Communication Architecture: JDBC.
Database maintenance: Mysql

Hardware Requirement: Pentium IV Processor with 1.9 GHz Clock Speed


512 MB RAM, 20 GB HDD, 32 Bit PCI Ethernet Card

2.1 Problem Definition


Most of the schools still use old method to take attendance student by

giving attendance sheet to student and student only needs to sign that paper. By use
this method, many students will cheat by asking their friends to help them to sign
their attendance if they absent. With this method, lecturers have to analyze and
record the attendance list manually to know who absent and come to class. If the
attendance sheet lost, the lecturers have to take attendance again and this will give
opportunity to students to cheat their attendance. This would impose the lecturer and
data that given also inaccurate.
This procedure, besides being troublesome for lecturer, also affects students
as time is expended on signing, verifying and submitting the attendance sheet
manually. Therefore, a system that can manage and help the lecturers to take
attendance easily has to be developed. This system must be created based on RFID
Device for attendance contains information about all students from a lecturers
section. The system can be easily accessed by the lecturers via the web. This system
must be able to manipulate and manage the data of the student attendance so that the
lecturers do not have to analyze the student attendance manually. They only have to
transfer the data, and the system will analyze all the data automatically.

2.2 Feasibility

Economical Feasibility
The System being developed is economic with respect to School or College's
Point of view. It's a cost effective in sense that has eliminated paper work completely. The
System is also time effective because the results are automated which are made at end of
month as per user requirement. The results obtained are highly user oriented.
Technical Feasibility
The Technical Requirement for the system is highly economic and it does not cost
for any additional cost.
Behavioral Feasibility
The System is quite easy to use and learn due its simple but attractive user
interface. User requires no special training for operating system.

2.3 System analysis

In the development cycle of the system, decisions can be made on the parts of the
system to be realized in the hardware design and the parts to be implemented in software.
The software may be decomposed into modules so that each module can be individually
tested as a unit and debugged before the modules are integrated and tested as a software
system in order to ensure that the software design meets its specification.
The program can be written in Object Oriented programming language for the
front end while the backend can be based on any database management system(DBMS).
A careful observation of the trend of usage of RFID tags leads one to consider the
possibility of its utilization for monitoring the attendance of students in educational
institutions, with the aid of program driven computers.
While every student given a specific RFID tag attends the lecture, a serial number
(related to each students roll number) of tag is associated with the student database entry.
So every time a student uses his/her card, the entries will be entered into the database
with the time stamp. The use of webcam might be optionally necessary to take a snap of
the person using the card. Webcam reduces proxy attendance attempts.
Consequently, the attendance data then can be used to create many types of
reports like daily attendance details, monthly, weekly and real time feedback to parents.
The attendance score calculation can be automated using the collected data. The mode of
operation through which the student attendance can be set up in a RFID system is
depicted in figure.

Tag

RF

RFID Reader

System Gui

Database

Illustration of the RFID system operational principle.


The tag is activated when it passes through a radio frequency (RF) field (125 kHz
in this case), which is generated by the antenna embedded within the reader box. The
program checks whether the tag is valid or not. If the tag is valid, it will continue to the
database program and registers the students attendance for the course. If the tag is
invalid, the program gives a notification that the tag has not been registered to any
student and requires the user to either supply a valid tag. Due to the reason of cost and
flexibility of implementation, this RFID attendance design application uses a passive tag
and thus for every class, students would have to bring their tags close to the reader (about
10 cm from the reader). On doing this, the reader reads the tag and the application
program records the students in time.

More flexibility and unconscious interaction of students to the developed system


can be achieved by using active tags. This will increase the overall cost of the system. At
the end of the semester, the lecturer can grade student's attendance.

START
Enroll Student For School and Assign RFID
Enable Arrival Time

Read Student In Time

Student No
Enrolled

Update
Database With
Arrival Time

Enrolle
d?

Display
Arrival Time

END

Directional flow of process

2.4 Current system

In Current System All Work is done on paper. The whole attendance session is
Store in Register and at the end of session reports are generated.
Disadvantages of Current System
1.Not User Friendly
The Existing system is not user friendly because retrieval of data is very slow and
data is maintained not efficiently.
2.Difficulty in Report Generating
We require a lot more calculations to generate report so it is generated at the end
of session. and student did not get single chance to prove their attendance.
3.Manual Control
All Calculations are done manually to generate report so there there are lot of
chance of errors.
4.Lots of Paper Work
Existing System requires lot of paper work. Loss of single register even led to
difficult situation.
5.Time Consuming
Doing Paper work all time is also time consuming.

2.5 Proposed system

The primary aim of the research is to uniquely identify individual students based on their
unique tag identifiers. The research should shower light on how scalable and efficient the
system is. A systematic and serialized approach is required to solve this conundrum. The
key characteristics of the application include:

Perform automated attendance


Generate report of attendees for a particular course
Error free tag identifier detection
Easy scalability to incorporate more records
Integrity and security in data storage

This paper concentrates on the principal purpose to overcome the human errors while
recording student attendance and the creation of a data centric student attendance
database system with an improved overall efficiency. The application graphical user
interface (GUI) is designed using Core and Advanced Java and Mysql is used as the
database provider.

3 System development
Components of an RFID System

An RFID system consists of various components that are connected to one


another by a dedicated communication path. The individual components are integrated
into the system to implement the benefits of RFID solution. The list of components is as
follows:
Tags an object that is attached to any product and uses a unique sequence of characters
to define it. It comprises of a chip and the antenna.
Antenna it is responsible for the transmission of information between the reader and
tag using radio waves.
Reader a scanning device that uses the antenna to realize the tags that are in its vicinity.
It transmits signals at a certain frequencies.
Middleware it is a communication interface to interpret and process data being fed by
the readers into information. It takes into account all relevant ports of communication and
a software application to represent this information.
Backend database a repository of information, which is designed specific to the
application. The database stores records of data specific to individual tags.
RFID technology has a widened horizon as it transcends into an era of emerging
application. A detailed research must be conducted to assay the limitations and feasibility
of implementing an RFID system. This paper focuses on the development of an
attendance management system using RFID technology to monitor the attendance for a
group of students. This paper attempts to evaluate the benefits of implementing RFID
technology to an existing system. implementation of RFID in student management will
provide additional capabilities like high efficiency and overall ease in management of the
system. The objectives of the research should be clearly organized to successfully
develop the system.
The software module of the middleware processes the raw data fed in by the
hardware circuit. The raw data fed into the middleware are:
Unique tag sequence number
Timestamp of data entry
The middleware obtains the unique identifier from the reader and compares it
with the list of stored tags. If the identifier sequence is present, then the details are
fetched and displayed on the LCD display and the GUI. If the identifier is not present
then a new record is created with
the corresponding timestamp and it is stored in the database.

3.1 Gantt chart

Gantt charts only represent part of the triple constraints (cost, time and scope) of
projects, because they focus primarily on schedule management. Moreover, Gantt
charts do not represent the size of a project or the relative size of work elements,
therefore the magnitude of a behind-schedule condition is easily miscommunicated.
If two projects are the same number of days behind schedule, the larger project has
a larger impact on resource utilization, yet the Gantt does not represent this
difference.
Although project management software can show schedule dependencies as lines
between activities, displaying a large number of dependencies may result in a
cluttered or unreadable chart.

3.2 Event table

3.3 Use Case diagram

Login

Registration

Admin

View And Edit


Student Details

Notificatio
n
Make
attendance

View
Reports

3.4 Sequence diagram / Collaboration diagram

Admin

Operator

Notification

Server

admin login
fill details and send
validation
if valid send notification to operator
if invalid show error message

Student
employee

operator

server

database

1: submit details
2: fill form of info of student
3: check validation
4: if valid update database
5: on invalid show error message

3.5 Activity diagram

enter all details

verification of user name

not valid
enter all mandatory
details
valid
verification of password and mandatory
fields

not valid

valid
registration
complete

go to user homepage

Registration

user-id already
exists

enter login id
and password

invalid admin-id
valid admin-id
invalid password
valid password
admin login
successful

go to admin
homepage

Login

3.6 Class Diagram

Login
UserId : Variant
Password : Variant
ForgetPassword()

Admin
UserId : Variant
Password : Variant
add/view/edit/deleteOperator()
...
notifications()
attendance()
scheduler()
salary()

Scheduler
Shift1(Morning) : Variant
Shift2(Evening) : Variant
Lunch : Variant
ProjectTitle
Deadline
Priority
edit/updateTimeSlot()
add/editProject()
Notifications
operatorstudent : Variant
detail : String
mode()
send()

Student
UserId : Variant
Student Name : String
Student Address : Variant
Student PhoneNo : Long
Student City : String
StudentState : String
StudentQualification : String
StudentDateOfBirth : Date
StudentSex : String

Operator
UserId : Variant
OperatorName : String
OperatorAddress : Variant
OperatorPhoneNo : Long
OperatorCity : String
OperatorState : String
OperatorQualification : ...
String
OperatorDateOfBirth : Date
OperatorSex : String

view/editReport)
viewAttendance()
viewAssignedReport()
discussion()
query()

addStudent
notifications()
attendance()
discussion()

Attendance
TotalDays
AttendanceCount
HolidayCount
generateAttendance()

Discussion
DiscussionId : Variant
DiscussionCategory : String
Post : Variant
startNew()
joinDiscussion()
reportAbuse()

report
count : String
status: Double
totaldays : Double
issueAttendence)
mode()
edit/update()

3.7 State chart diagram

Login
Log out

Receive Info

Add New

Aut
h

Cn
t.

Application
IDE

Student Track

Database
Report
Student attendance

Attendance

3.8 Component diagram

3.9 Deployment diagram


Server PC
Client Pc
Servlet
s
Send
Info To
Server

Java
Network
ing

Update
Student

Apache
Tomcat

Data
base

View
Attendanc
e

Servlets
Serial
Com

RFID
Reader

Add
stud
Info

Remove
Student

Serialization
,Java
I/o,Collections

View DB

View
Report

Java
Api

3.10 Menu tree


RFID Based Attendance System

Login

Admin Login

Registration

Make
Attendance

Exit

4 Program list

Reports

Student
Report

5 Table list

In This Application MySql Database is used as Back End.MySql is the worlds most
popular open source database, enabling the cost-effective delivery of reliable, highperformance and scalable Web-based and embedded database applications.
Database Table Are Listed Below
1.AdminReg
This Database Table is used to store admin registration information.
2.AssignRfid
This Database table is used to store details of student assigned rfid.
3.AttendenceInTime
This Database is used to store details of in time attendance.
4.AttendenceOutTime
This Database is used to store details of out time attendance.
5.Registration
This Database is used to store details of student registration.

6 Report list

There are total three reports in application. They all are listed below
1.Student Registration Report

2.Rfid Assigned Student Report

3. Student Attendance Report

7 System testing and conclusion


System Testing:
Testing assures Quality and bug free delivery of product.
Testing is dynamic method for verification and validation. Where the system to be tested
is executed and the behavior of the system is observed. Due to this, testing observed
failures of the system. From which presence of fault can be detected.
Testing plays a critical role in quality assurance for software. Due to the
limitations of design and requirement faults also appear in the code errors can occur
anywhere in software being built. Testing is used to detect these errors, in addition to the
error introduced during coding phase.
As project is in medium state and it is progress mode so our team only done few types of
testing regarded to our project that are as follows:
1) Unit testing :
Testing of individual software components or modules.
Typically done by the
programmer and not by testers, as it requires detailed knowledge of the internal program
design and code. may require developing test driver modules or test harnesses.
2) Pair-wise testing:It is done while developing code for project. it is always done with other team member or
developer but developer should be aware of minimum syntax of that programming
language.
3) Functional or modular testing:
As name suggests that each module which developer is going to develop must be tested
entirely after developing of that module.

Conclusion
In conclusion, the objective to build an RFID based attendance system was
successfully achieved. In terms of performance and efficiency, this project has provided a
convenient method of attendance marking compared to the traditional method of
attendance system. By using databases, the data is more organized. This system is also a
user friendly system as data manipulation and retrieval can be done via the interface,
making it a universal attendance system. Thus, it can be implemented in either an
academic institution or in organizations. However, some further improvements can be
made on this RFID in order to increase its reliability and effectiveness Finally, this
attendance system can be improved by adding a feature where the attendance system
indicates when a student is late for work or classes as the case maybe. Hence we
conclude from that using RFID technology tracking , maintaining log and time
attendance of employees can be done by administrator through system very effectively
and efficient manner that will reduce cost as well.

8 Data entry form

9 Coding conventions
Why coding standards are important
Coding standards for Java are important because they lead to greater consistency within
code of all developers. Consistency leads to code that is easier to understand, which in
turn results in a code, which is easier to develop and maintain. Code that is difficult to
understand and maintain runs the risk of being scrapped and rewritten.
The Prime Directive
A project requirement may vary from the standards mentioned in this document. When
going against the standards, projects should make sure to document it.
1. Naming Convention

Use full English descriptors that accurately describe the variable/field/class/interface


For example, use names like firstName, grandTotal, or CorporateCustomer.
Use terminology applicable to the domain
If the users of the system refer to their clients as Customer, then use the term Customer
for the class, not client.
Use mixed case to make names readable
Use abbreviations sparingly, but if you do so then use then intelligently and
document it
For example, to use a short form for the word number, choose one of nbr, no or num.
Avoid long names (<15 characters is a good tradeoff)
Avoid names that are similar or differ only in case
2. Documentation
Comments should add to the clarity of code.
Avoid decoration, i.e., do not use banner-like comments
Document why something is being done, not just what.
Java Comments
Comment Type
Documentation
Starts with /** and ends with
*/

Usage
Used before declarations of
interfaces, classes, member
functions, and fields to
document them.

Example
/**
* Customer a person or
* organization
*/

C style
Starts with /* and ends with */
Single line
Starts with // and go until the
end of the line

Used to document out lines of


code that are no longer
applicable. It is helpful in
debugging.

/*
This code was commented
out by Ashish Sarin
*/

Used internally within


member functions to
document business logic,
sections of code, and
declarations of temporary
variables.

// If the amount is greater


// than 10 multiply by 100

3. Standards For Member Functions


3. 1 Naming member functions
Member functions should be named using a full English description, using mixed case
with the first letter of any non-initial word capitalized. The first word of the member
function should be a verb.
Examples
openAccount()
printMailingList()
save()
delete()

10 Source code
AdmissionReport.java
public class AdmissionReport extends javax.swing.JFrame {
/**
* Creates new form AdmissionReport
*/
// int i;
// static Vector<Vector<String>> data=new Vector<Vector<String>>();
String[] columnNames = {"Registration id", "First Name", "Middle Name", "Last
Name","Address","Dob","Age","Date Of Registration","Register Rfid No"};
public AdmissionReport()
{
initComponents();
//

Vector<String> headers=new Vector<String>();


// headers.add("Registration id");
// headers.add("First Name");
// headers.add("Middle Name");
// headers.add("Last Name");
// headers.add("Address");
// headers.add("Dob");
// headers.add("Age");
// headers.add("Date Of Registration");
// headers.add("Register Rfid No.");
//
//
// getData();

//this is the model which contain actual body of JTable


DefaultTableModel model=new DefaultTableModel(null,columnNames);
//model.addColumn(null, columnNames);
// jTable1=( DefaultTableModel) new DefaultTableModel(null, columnNames);
//model.setColumnIdentifiers(columnNames);
//jTable1=new JTable(model);
//jTable1 = new JTable();
jTable1.setModel(model);
//int i1=jTable1.getRowCount();
//if(i1>1)
//{
// model.removeRow(0);
// i1=i1-1;
//}

int i=jTable1.getRowCount();
while(i>=1)
{
model.removeRow(0);
i=i-1;
}
//for(int i1=0;i<jTable1.getRowCount();i++)
//{
// model.removeRow(i1);
//}
//jTable1.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
//jTable1.setFillsViewportHeight(true);
//JScrollPane scroll = new JScrollPane(jTable1);
//scroll.setHorizontalScrollBarPolicy(
//JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
//scroll.setVerticalScrollBarPolicy(
//JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
String str="select rid,fname,mname,lname,address,dob,age,dor,rfidtagdata from
schoolrfid.registration";
Connection cn;
ResultSet rs;
Statement st;
String rid,fname,mname,lname,add,dob,age,dor,rfidtag;
try {
// Change the database name, hosty name,
// port and password as per MySQL installed in your PC.
cn=DriverManager.getConnection("jdbc:mysql://"
+"localhost:3306/schoolrfid","root","root");
st=cn.createStatement();
rs=st.executeQuery(str);
System.out.println("connected to database.. ");
// int i=0;
while(rs.next())
{
//Vector <String> d=new Vector<String>();
rid=(rs.getString("rid"));
fname=(rs.getString("fname"));
mname=(rs.getString("mname"));
lname=(rs.getString("lname"));
add=(rs.getString("address"));
dob=(rs.getString("dob"));

age=(rs.getString("age"));
dor=(rs.getString("dor"));
rfidtag=(rs.getString("rfidtagdata"));
System.out.println("rid-->"+rid);
System.out.println("fname-->"+fname);
System.out.println("mname-->"+mname);
System.out.println("lname-->"+lname);
System.out.println("add-->"+add);
System.out.println("dob-->"+dob);
System.out.println("age-->"+age);
System.out.println("dor-->"+dor);
System.out.println("rfid-->"+rfidtag);
String [] data={rid,fname,mname,lname,add,dob,age,dor,rfidtag};
model.addRow(data);
jTable1.setEnabled(false);
//System.out.println("data in d-->"+d);
//data.add(d);
}
}
catch (Exception e)
{
e.printStackTrace();
}

DatePicker.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class DatePicker {
int month = java.util.Calendar.getInstance().get(java.util.Calendar.MONTH);
int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);;
JLabel l = new JLabel("", JLabel.CENTER);
String day = "";
JDialog d;
JButton[] button = new JButton[49];
public DatePicker(JFrame parent) {
d = new JDialog();
d.setModal(true);
String[] header = { "Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" };
JPanel p1 = new JPanel(new GridLayout(7, 7));
p1.setPreferredSize(new Dimension(430, 120));
for (int x = 0; x < button.length; x++) {
final int selection = x;
button[x] = new JButton();
button[x].setFocusPainted(false);
button[x].setBackground(Color.white);
if (x > 6)
button[x].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
day = button[selection].getActionCommand();
d.dispose();
}
});
if (x < 7) {
button[x].setText(header[x]);
button[x].setForeground(Color.red);
}
p1.add(button[x]);
}
JPanel p2 = new JPanel(new GridLayout(1, 3));
JButton previous = new JButton("<< Previous");
previous.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
month--;
displayDate();
}
});
p2.add(previous);

p2.add(l);
JButton next = new JButton("Next >>");
next.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
month++;
displayDate();
}
});
p2.add(next);
d.add(p1, BorderLayout.CENTER);
d.add(p2, BorderLayout.SOUTH);
d.pack();
d.setLocationRelativeTo(parent);
displayDate();
d.setVisible(true);
}
public void displayDate() {
for (int x = 7; x < button.length; x++)
button[x].setText("");
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(
"MMMM yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year, month, 1);
int dayOfWeek = cal.get(java.util.Calendar.DAY_OF_WEEK);
int daysInMonth = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
for (int x = 6 + dayOfWeek, day = 1; day <= daysInMonth; x++, day++)
button[x].setText("" + day);
l.setText(sdf.format(cal.getTime()));
d.setTitle("Date Picker");
}
public String setPickedDate() {
if (day.equals(""))
return day;
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(
"dd-MM-yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year, month, Integer.parseInt(day));
return sdf.format(cal.getTime());
}
}

11 Screen layout with test data and test results


AssignRfid Form

Login Form

Home Page

12 Report layouts

13 References/ bibliography/websites

Daniel McPherson and Vinod Chachra. Personal privacy and use of RFID
technology

in

libraries.

White

Paper,

VTLS

Inc.,

October

2003

www.vtls.com/documents/privacy.pdf.

Stephan Engberg, Morten Harning, and Christian Damsgaard Jensen. Privacy


& security enhanced RFID preserving business value and consumer
convenience. In The Second Annual Conference on Privacy, Security and Trust,
New Brunswick, Canada, October 2004.

A.Cerino and W.P. Walsh. Research and application of radio frequency


identification (RFID) technology to enhance aviation security. In National
Aerospace and Electronics Conference NAECON 2000.

M.M.Ollivier. RFID a new solution technology for security problems.


European Convention on Security and Detection May 1995.

Campbell, Brian. "Background Information on RFID and Automated Book


Sorting" Vancouver. B.C, Vancouver Public Library. November 12, 2003.

Potrebbero piacerti anche