Sei sulla pagina 1di 12

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) {%> <form name="centerselection" method="post" action="valcenter.jsp"> <h3>Step 2:</h3> <h4>Select nearest center of examination for your locality</h4> <h4>Re-enter your username for security reasons</h4> Username <input type="text" name="uname2"><br> Exam Center <select name="center"> <%java.sql.Connection con2=DriverManager.getConnection("jdbc:my sql://localhost:3306/exam","root","root"); Statement stmt2=con2.createStatement(); ResultSet rst=null; rst=stmt2.executeQuery("select * from center where local='"+cit+"'"); while(rst.next()){%> <option><%=rst.getString(1)%></option> <option><%=rst.getString(2)%></option> <option><%=rst.getString(3)%></option> <option><%=rst.getString(4)%></option> </select><br>

<input type="submit" value="Complete Registration"> </form> <%} } else {%> <center><a href="reg.jsp">Unsuccessful registration<br>Click here to try again</a></center>

<% stmt.close(); con.close(); }%> </body> </html>

Valcenter.jsp: <%@ page language="java" import="java.sql.*"%> <%@ page language="java" import="javax.sql.*"%> <% String cent=request.getParameter("center"); String user=request.getParameter("uname2"); session.putValue("uname",user); Class.forName("com.mysql.jdbc.Driver"); java.sql.Connection con=DriverManager.getConnection("jdbc: mysql://localhost:3306/exam","root","root "); Statement stmt=con.createStatement();
Login:

int i=stmt.executeUpdate("update cand set local='"+cent+"' where uname='"+user+"'"); stmt.close(); con.close(); if(i!=0) {%> <center><h2>Registration successful you can now login</h2></center><% } else {%> <center><a href="reg.jsp">Unsuccessful registration<br>Click here to try again</a></center> <%}%>

Vallogin.jsp: <%@ page language="java" import="java.sql.*"%> <%@ page language="java" import="javax.sql.*"%> <%

String userid=request.getParameter("unamef"); String pwd=request.getParameter("passf"); 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> <% } else {

out.println("Invalid username/password");%> <br><center><a href="login.jsp" target="_top">Click here to try again</a><center> <% } } rst2.close(); rst=stmt.executeQuery("select * from cand where uname='"+userid+"'"); if(rst.next()) { if(rst.getString(2).equals(pwd)) { Cookie cookie = new Cookie ("username",userid); response.addCookie(cookie); out.println("Welcome "+rst.getString(3)); %> <br><center><a href="stud.jsp" target="_top">Click here to enter the Candidate panel</a><center> <% } else { out.println("Invalid username/password");%> <br><center><a href="login.jsp">Click here to try again</a><center> <% } } %>

Admin Candidate Verification and ID Number generation:

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

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.

Potrebbero piacerti anche