You are on page 1of 13

EXAM REGISTRATION SYSTEM

Project Number: 6
6.0 INTRODUCTION:
To analyze, design and develop code for Exam Registration System using Rational Rose
software and implement it using JSP.

6.1 PROBLEM STATEMENT:


To create an Exam registration software that will meet the needs of the applicant and help
them in registering for the exam, generate the identification number, modification in database and
accessing the various exam centers.

OVERALL DESCRIPTION:
The Exam Registration System is an integrated system that has four modules as part of it. The
four modules are,
1) Registration for the exam: In this module, the candidate registers into the system with the
various credentials.
2) Accessing Exam Center: In this module the candidate changes or modifies the available
exam centers for his locality.
3) Candidate Verification: In this module the candidate is verified by the registration controller.
4) Generation of unique identification number: In this module a unique identification number
is generated by the system for the candidate.

6.2 SOFTWARE REQUIREMENT SPECIFICATION:

6.2.1 SOFTWARE REQUIRMENTS:

 Rational Rose
 MySql – Database
 Apache Tomcat – Localhost Server
 Text Editor – JavaServlet Page

6.2.2 HARDWARE REQUIRMENTS:

 128MB RAM
 Pentium III Processor
 Network card

6.2.3 RISK ANALYSIS:

 Failure of Backup details


 If Admin fails to update the exam center details
 If Admin fails to verify the candidate
 If the candidate does not submit his/her proof of credentials on time
 If the unique id generation fails.
6.2.4 GANTT CHART:

6.3 USECASE DIAGRAM:


6.4 ACTIVITY DIAGRAM:

6.5 CLASS DIAGRAM:


6.6 INTERACTION DIAGRAM:

6.6.1 SEQUENCE DIAGRAM:

6.6.2 COLLABRATION DIAGRAM:


6.7 STATE CHART DIAGRAM:

6.8 LOGICAL ARCHITECTURE DIAGRAM:


6.9 TECHNICAL SERVICES LAYER:

JSP:

Registration and Exam Center Selection:

Valreg.jsp:

<html>
<body>
<%@ page
language="java"
import="java.sql.*"%>
<%@ page
language="java"
import="javax.sql.*"%>
<%
String
user=request.getParameter("uname");
session.putValue("uname",user);
String pwd=request.getParameter("pass");
String name=request.getParameter("name");
String email=request.getParameter("email");
String addr=request.getParameter("addr");
String cit=request.getParameter("city");
Class.forName("com.mysql.jdbc.Driver");
java.sql.Connection
con=DriverManager.getConnection("jdbc:mys
ql://localhost:3306/exam","root","root");
Statement stmt=con.createStatement();
String c="0";
int i=stmt.executeUpdate("insert into cand
values
('"+user+"','"+pwd+"','"+name+"','"+addr+"','
"
+email+"','"+cit+"','"+c+"','"+c+"','"+c+"')");
if(i!=0)
Exam Center <select name="center">
<%java.sql.Connection

{%>
<form
con2=DriverManager.getConnection("jdbc:my
name="centerselection"
sql://localhost:3306/exam","root","root");
method="post"
Statement stmt2=con2.createStatement();
action="valcenter.jsp">
ResultSet rst=null;
<h3>Step 2:</h3>
rst=stmt2.executeQuery("select * from center
<h4>Select nearest
where local='"+cit+"'");
center of examination for your
while(rst.next()){%>
locality</h4>
<option><%=rst.getString(1)%></option>
<h4>Re-enter your
<option><%=rst.getString(2)%></option>
username for security
<option><%=rst.getString(3)%></option>
reasons</h4>
<option><%=rst.getString(4)%></option>
Username <input
</select><br>
type="text"
name="uname2"><br>
<input type="submit" <%
value="Complete stmt.close();
Registration"> con.close();
</form> }%>
<%} </body>
} </html>
else
{%> <center><a
href="reg.jsp">Unsuccessful
registration<br>Click here to try
again</a></center>

Valcenter.jsp:

<%@ page language="java" con=DriverManager.getConnection("jdbc:


import="java.sql.*"%> mysql://localhost:3306/exam","root","root ");
<%@ page language="java" Statement stmt=con.createStatement();
import="javax.sql.*"%>
<% Login:
String
cent=request.getParameter("center");
String
user=request.getParameter("uname2");
session.putValue("uname",user);
Class.forName("com.mysql.jdbc.Driver");
java.sql.Connection
int i=stmt.executeUpdate("update }
cand set local='"+cent+"' where else
uname='"+user+"'"); {%>
stmt.close(); <center><a
con.close(); href="reg.jsp">Unsuccessful
if(i!=0) registration<br>Click here to
{%> try again</a></center>
<center><h2>Registration <%}%>
successful you can now
login</h2></center><%

Vallogin.jsp:
<%@ page
<%@ page language="java" language="java"
import="java.sql.*"%> import="javax.sql.*"%>
<%
String <%
userid=request.getParameter("unamef"); }
String pwd=request.getParameter("passf"); else
{
String DRIVER = "org.gjt.mm.mysql.Driver";
Class.forName(DRIVER).newInstance();
Connection con=null;
ResultSet rst=null;
Statement
stmt=null; ResultSet
rst2=null;
String url="jdbc:mysql://localhost/exam?
user=root& password=root";
con=DriverManager.getConnection(url);
stmt=con.createStatement();
rst2=stmt.executeQuery("select * from admin
where uname='"+userid+"'");
if(rst2.next())
{
if(rst2.getString(2).equals(pwd))
{
Cookie cc=new
Cookie("logincredentials","userid");
response.addCookie(cc);
out.println("Welcome "+userid); %>
<br><center><a href="admin.jsp"
target="_top">Click here to enter the Admin
panel</a><center>
out.println("Invalid username/password");%> response.addCookie(cookie);
<br><center><a out.println("Welcome "+rst.getString(3)); %>
href="login.jsp" <br><center><a href="stud.jsp"
target="_top">Click here target="_top">Click here to enter the
to try again</a><center> Candidate panel</a><center>
<% } <%
} }
rst2.close(); else
rst=stmt.executeQuery("select * {
from cand where out.println("Invalid username/password");%>
uname='"+userid+"'"); <br><center><a href="login.jsp">Click
if(rst.next()) here to try again</a><center>
{ <%
if(rst.getString(2).equals(pwd)) }
{ }
Cookie cookie = new Cookie %>
("username",userid);

Admin Candidate Verification and ID Number generation:


Valcandverif.jsp:

<%@page import="java.sql.*"%> Statement st=con.createStatement();


<% int i=st.executeUpdate("update cand
String verification=""; set status='1', regid='"+candreg+"' where
String uname='"+verification+"'");
cand[]=request.getParameterValues("verifcand %>
"); <center><h2>Candidate(s)
for(int i=0;i<cand.length;i++) Verified</h2><h3><a href="acand.jsp">Click
{ verification+=cand[i]+" "; here to view Candidate verification
} page</a></h3></center>
int candreg = (int) (Math.random() <%
* 3281010); }
try{ Class.forName("com.mysql.jdbc catch(Exception e)
.Driver"); { System.out.println(
Connection con = e);
DriverManager.getConnection("jdbc:mysql://l }
ocalhost:3306/exam", "root", "root"); %>

Candidate Profile page | Before verification:

Candidate Profile page | After verification:


6.10 DOMAIN LAYER:

MYSQL Queries:

Database Schema:

delimiter $$

CREATE DATABASE `exam` /*!40100 DEFAULT CHARACTER SET utf8 */$$

Admin Table:

delimiter $$

CREATE TABLE `admin` (


`uname` varchar(45) NOT NULL,
`pass` varchar(45) NOT
NULL, PRIMARY KEY
(`uname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$

Candidate Table:

delimiter $$

CREATE TABLE `cand` (


`uname` varchar(45) NOT NULL,
`pass` varchar(45) NOT NULL,
`name` varchar(45) NOT NULL,
`address` varchar(45) NOT NULL,
`email` varchar(45) NOT NULL,
`city` varchar(45) NOT NULL,
`local` varchar(45) DEFAULT NULL,
`status` int(11) NOT NULL,
`regid` varchar(45) DEFAULT NULL,
PRIMARY KEY (`uname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$

Exam Center Table:

delimiter $$

CREATE TABLE `center` (


`5` varchar(45) DEFAULT NULL,
`4` varchar(45) DEFAULT NULL,
`3` varchar(45) DEFAULT NULL,
`2` varchar(45) DEFAULT NULL,
`local` varchar(45) NOT
NULL, PRIMARY KEY
(`local`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$
6.11 USER INTERFACE LAYER:

FRONT-END DESIGN:

Home Page:

Candidate Panel

Admin Panel:
6.12.1 COMPONENT DIAGRAM:

6.12.2 DEPLOYMENT DIAGRAM:

6.13 CONCLUSION:
This project was carried out in a sequential manner to design and implement the “Exam
Registration System”. Thus the outcome of the project is efficient. The Exam Registration System
caters the varied requirements of the user to perform the functionality with ease and efficiency.

You might also like