OnlineExaminationProject Report
OnlineExaminationProject Report
OnlineExaminationProject Report
On
“Online Examination System”
Submitted
In Partial Fulfillment of the Requirements
For the Degree of
Masters of Computer Application
Submitted by:
Anpurna Parashar (MCA VI)
Maninder Kaur (MCA VI)
Submitted to:
Date: 30/04/2018
Anpurna Parashar
Maninder Kaur
Register No. 3 & 15
SUBMITTED TO:
Date: 30/04/2018
(Signature)
I express my heartiest gratitude and respectful regards to Mr. NAJMUL HASAN ARSHI my project
guide, for his valuable guidance, constructive criticism and consistent enthusiastic interest during the
course of investigation and writing of manuscript that led this work to its successful completion. I
regard my sincere thanks to the technical staff at the organization/ company that helped me during the
project and made this project successful.
I would also like to express my profound sense of gratitude to our internal guide Mr. NAJMUL
HASAN ARSHI, Lecturer of the Department of CETPA, University of Kota, Kota Rajasthan, for his
support and encouragement while doing the project. Last but not the least our special thanks to our
Parents and friends for their support and constant encouragement during the project work.
I am highly indebted to the Department of Computer Science & informatics, University of Kota, Kota
Rajasthan their support regarding our project report.
INDEX
1. INTRODUCTION *
2. OBJECTIVE
3. SOFTWARE DEVELOPMENT METHODOLOGY
SPIRAL MODEL
History of Spiral Model
Risk Determines Level of Effort
4. Software Requirement Specification (SRS)
1. Introduction:
i) Purpose:
ii) Scope:
iii) Abbreviations:
iv) References:
v) Overview:
2. Overall Description:
i.) Product Perspective:
ii.) Product Functions:
iii.) User Characteristics:
iv.) Constraints:
v.) Assumptions:
3. Specific Requirements:
External Interface Requirements:
*Student Registration Screen
*Student Login Screen
*Answering Questions
*Exam Details Screen
*Admin Login Screen
*Adding Exam Question Screen
*Deleting Exam Question Screen
*View user Details Screen
5. DATA FLOW DIAGRAM
DATA FLOW
PROCESS
EXTERNAL ENTITY
DATA STORE
OUTPUT
6. FUNCTIONAL REQUIREMENTS
FRONTEND: - (LANGUAGES)
J2EE ( jsp , servlet )
APACHE TOMCAT
HTML
BACKEND: - (DATABASE)
ORACLE 10g STANDARD EDITION
SQL (STANDARD QUERY LANGUAGE)
7. NON-FUNCTIONAL REQUIREMENTS
Performance
Availability
Reliability
Usability
Portability
Flexibility
8. CODING
1. USER.JSP (home page)
2. SIGNUP.JSP
3. DATA_SAVE.JSP
4. LOGIN.JSP
5. COICE.JSP
6. BEGINC.JSP
7. CHECKC.JSP
8. CQUES.JSP
9. SAVEC.JSP
10. CALCULATECRESULT.JSP
11. ADMIN2.JSP
12. ADMIN.JSP
13. MODIFYC.JSP
14. MODIFYJAVA.JSP
15. UPDATECQUES.JSP
16. UCQ.JSP
17. DELETECQUES.JSP
18. DCQ.JSP
19. VIEWDETAILSCUSER.JSP
20. VIEWCUSER.JSP
21. MODIFYJAVA.JSP
22. UPDATEJAVAQUES.JSP
23. UJQ.JSP
24. DELETEJAVAQUES.JSP
25. DJQ.JSP
26. VIEWDETAILSJAVAUSER.JSP
27. VIEWJAVAUSER.JSP
28. FORGOTPASS.JSP
29. SETNEWPASS.JSP
30. HEAD.JSP
31. FOOT.JSP
32. ERROR.JSP
9. CONCLUSION*
10. APPLICATIONS*
11. BIBLIOGRAPHY/REFERENCES*
INTRODUCTION
Online Exams is being launched because a need for a destination that is beneficial for
both Institutes and Students. With this site, Institutes can register and host online exams.
Students can give exams and view their results. This site is an attempt to remove the
existing flaws in the manual system of conducting exams.
Purpose
Online Exams System fulfills the requirements of the institutes to conduct the
exams online. They do not have to go to any software developer to make a separate
site for being able to conduct exams online. They just have to register on the site
and enter the exam details and the lists of the students which can appear in the
exam. Students can give exam without the need of going to any physical
destination. They can view the result at the same time. Thus the purpose of the site
is to provide a system that saves the efforts and time of both the Institutes and the
students.
Online Exams System is a web application that establishes a network between the
Institutes and the Students. Institutes enter on the site the questions they want in
the exam. These questions are displayed as a test to the eligible students. The
answers enter by the students are then evaluated and their score is calculated and
saved. This score then can be accessed by the Institutes to determine the passes
students or to evaluate their performance.
Online Exams System provides the platform but does not directly participate in,
nor is it involved in any tests conducted. Questions are posted not by the site, but
users of the site. The site requires an institute to register before posting the
questions. The site has an administrator who keeps an eye on the overall
functioning of the system. The site gets revenue by charging the institutes each
time they want to conduct the exam. The system entitled “Online Exams System”
is application software, which aims at providing services to the institutes and
voiding them with an option of selecting the eligible students by themselves. It is
developed by using J2EE technology and related database.
OBJECTIVE
Online examination can reduce the hectic job of assessing the answers given by
candidates manually.
The result can be shown immediately to the students reducing the anxiety.
Can create various reports and graphs for evaluation purpose almost instantly
when and where required.
Software process is the way in which we produce the software. Apart from hiring
smart, knowledge able engineers and buying the latest development tools, effective
software development process is also needed, so that engineers can systematically
use the best technical and managerial practices to successfully complete their
projects. A software life cycle is the series of identifiable stages that a software
product undergoes during its life time. A software lifecycle model is a descriptive
and diagrammatic representation of the software life cycle. A life cycle model
represents all the activities required to make a software product transit through its
lifecycle phases. It also captures the order in which these activities are to be taken.
Life Cycle Models. There are various life cycle models to improve the software
processes.
WATERFALL MODEL
PROTOTYPE MODEL
ITERATIVE ENHANCEMENT MODEL
EVOLUTIONARY MODEL
SPIRAL MODEL
Spiral Model
History of Spiral Model
This model was first described by Barry Boehm in his 1986 paper "A Spiral Model
of Software Development and Enhancement". In 1988 Boehm published a similar
paper to a wider audience. These papers introduce a diagram that has been
reproduced in many subsequent publications discussing the spiral model.
These early papers use the term "process model" to refer to the spiral model as well
as to incremental, waterfall, prototyping, and other approaches. However, the spiral
model's characteristic risk-driven blending of other process models' features is
already present:
This invariant identifies the four basic activities that must occur in each cycle of
the spiral model:
1. Consider the win conditions of all success-critical stakeholders.
2. Identify and evaluate alternative approaches for satisfying the win
conditions.
3. Identify and resolve risks that stem from the selected approach(es).
4. Obtain approval from all success-critical stakeholders, plus commitment to
pursue the next cycle.
Project cycles that omit or shortchange any of these activities risk wasting effort
by pursuing options that are unacceptable to key stakeholders, or are too risky.
Some "hazardous spiral look-alike" processes violate this invariant by excluding
key stakeholders from certain sequential phases or cycles. For example, system
maintainers and administrators might not be invited to participate in definition and
development of the system. As a result, the system is at risk of failing to satisfy
their win conditions.
1. Introduction:
The following subsections of the SRS document provide an overview of the entire
SRS.
iii) Abbreviations:
JSP stands for Java Server Pages
HTTP stands for Hyper Text Transfer Protocol
iv) References:
IEEE Recommended Practice for Software Requirements Specification-
IEEE Std 830-1993.
v) Overview: The rest of this SRS document describes the various system
requirements, interfaces, features and functionalities in detail.
2. Overall Description: In Online examination system institute, can register to
conduct an online test and view the records later. Students can give the test and
their respective records, which include their marks for each test given by them, will
be maintained separately. No student can take a particular exam more than once.
i) Product Perspective:
(i) User interfaces the application will have a user friendly and menu based
interface.
Following screens will be provided:
(ii) A login screen for entering the username, password will be provided. Access to
different screens will be based upon the user.
(iv) There is a screen for displaying information regarding filling of exam details
by institutes.
(v) There is a screen for displaying information regarding entering student list for
the particular exam.
(vi) There is a screen for displaying information menu regarding what options the
institutes will select while filling entries (entering questions, student list, deleting
questions, entering exam details).
(vii) There is a screen for displaying exam details to the students when they are
taking exams.
(ix) There is a screen for displaying of results of students after taking the exam.
(i) Support for printer for printing results then and there.
(ii) Screen resolution of at least 800X600 is required for proper and
Complete viewing of screens. Higher resolution will be accepted.
ii.) Product Functions: The website will allow access only to authorized users
with specific roles (Administrator- maintains the website, Institutes-Register to
conduct the exams, Students-Give the exams online)A summary of the major
functions that the website will perform: Provide facility to institutes to register to
conduct
a) Online test.
b) Institutes can enter the number of questions, +ve, -ve marks, questions and
answers and the list of eligible students.
c) Students can login and give the tests.
iv.) Constraints:
* Since the DBMS being used is MS Access 2000, which is not a very popular
DBMS, it will not be able to store a very huge number of records.
* Due to limited features of DBMS being used performance tuning features will
not be applied to the queries and thus the system may become slow with the
increase in number of records being stored.
* An extra security as SSL must be used to secure the marks details examination
information.
V.) Assumptions: The examinations are all objective. Students can give each
exam just once.
*Student Registration Screen: Various fields available on this screen will be:
*User Name
*Password
*Mobile
*Email
*City
*Software interfaces:
*Any windows based operating system.
*ORACLE 10g STANDERD EDDITION as the DBMS-for database.
*IDE (ECLIPES) for developing code.
*Communications interfaces
*None
A DFD also known as ‘bubble chart’ has the purpose of clarifying system
requirements and identifying major transformations. It shows the flow of data
through a system. It is a graphical tool because it presents a picture. The DFD may be
partitioned into levels that represent increasing information flow and functional
detail. Four simple notations are used to complete a DFD.
These notations are given below:-
DATA FLOW: - The data flow is used to describe the movement of information
from one part of the system to another part. Flows represent data in motion. It is a
pipe line through which information flows. Data flow is represented by an arrow.
DATA STORE: - The data store represents a logical file. A logical file can represent
either a data store symbol which can represent either a data structure or a physical file
on disk. The data store is used to collect data at rest or a temporary repository of data.
It is represented by open rectangle.
OUTPUT:-The output symbol is used when a hard copy is produced and the user of
the copies cannot be clearly specified or there are several users of the output.
DATA FLOW DIAGRAM
FUNCTIONAL REQUIREMENTS
It deals with the functionalities required from the system which are as follows:
The website will help the colleges/organizations/companies to conduct their
online exams.
Only authorized person can access related details.
The organization will register themselves on the website for conducting their
exams.
Organizations can change their information regarding themselves.
The students can login through TEST-ID and PASSWORD and give their
exams.
Administrator will be responsible for updating the site.
The organization can change questions and test papers whenever they want.
FRONTEND: - (LANGUAGES)
HTML: - HTML stands for Hyper Text Markup Language, is a markup language for
web pages. It provides a means to create structured documents Including headings,
pictures, objects, lists, links, and other items and can be used to create interactive
pages. It can include or can load scripts in languages such as JAVA SCRIPT which
affects the behavior of HTML processors like Web Browsers.
BACKEND :- (DATABASE)
They are the quality requirements that stipulate how well software does what it has to
do.
Performance
No. of terminals to be supported is dependent on the server that we will use at the time
of deployment. The web application server used should provide good performance
and ability to manage performance with techniques such as support for caching.
After completing the exam, the entire score of the student will be calculated as per the
rules in less than a second.
Availability
Online Examination site has 24*7 availability. It can be accessed for 24 hours a day.
For this UPS support must be on the server site with a backup of at least 8 hours in
case of power failure.
Students can take exam only during the previously allotted time slots, however can
open site anytime to access other information. Colleges can register for the exam
anytime.
Reliability
Usability
The website should be user friendly and should require least effort to operate.
The web server used should provide services like session management to maintain
sessions in the application.
Portability
The website is made using HTML, JSP etc. which are platform independent and can
be transported to other servers with minimum effort.
Flexibility
This is an era of information technology where automation of each and every activity
is gaining importance. The site will lead to the automation of the examination system.
Moreover, it is far better than the previous such websites.
This website is better than previous versions as most of the online exam sites provide
facility to only one institute to hold the tests. They are static and are associated with
a particular institute or test. STUDENT PERFORMANCE ENHANCEMENT is a
website that can be used by multiple institutes. Any institute that wants to conduct
the exam can register on the site.
CODING
INDEX.HTML
<marquee>
<h1>WELCOME TO ONLINE EVALUATIONSYSTEM</h1>
</marquee>
<br> <br><br><br>
<b><i>Copyright © [email protected]</i></b></p>
</body>
</html>
USER.JSP
<h1>Sign up : </h1><br>
<fieldset>
<legend> Enter details here :</legend><br><br>
<form action="data_save.jsp" method="post">
<center><table style="text-align: center ;">
<tr><td>User name </td><td><input type="text"
name="user"></td></tr>
<tr><td>Password </td><td><input type="password"
name="pass"></td></tr>
<tr><td>Mobile </td><td><input type="number"
name="mobile"></td></tr>
<tr><td>Email* </td><td><input type="email"
name="email"></td></tr>
<tr><td>City </td><td><input type="text"
name="city"></td></tr>
<tr><td colspan=2><input type="submit" value="Create Account"></td></tr>
</center></table>
</form>
</fieldset>
</body>
</html>
DATA_SAVE.JSP
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg">
<%
String u=request.getParameter ("user");
String p=request.getParameter ("pass");
String m=request.getParameter ("mobile");
String e=request.getParameter ("email");
String c=request.getParameter ("city");
Class.forName ("oracle.jdbc.OracleDriver");
Connection conn=DriverManager.getConnection
("jdbc:oracle:thin:@localhost:1521:project","scott","tiger");
String query="insert into user_details2 values(?,?,?,?,?)";
PreparedStatement ps=conn.prepareStatement(query);
ps.setString(1,u);
ps.setString(2,p);
ps.setString(3,m);
ps.setString(4,e);
ps.setString(5,c);
ps.executeUpdate();
out.println("<b>record saved</b>");
out.println("<a href=user.jsp>Click here for login</a>");
conn.close();
%>
</body>
<jsp:forward page="user.jsp"/>
<%@include file="foot.jsp" %>
</html>
LOGIN.JSP
<%@include file="head.jsp" %>
<html>
<body background="im.jpg"><b>
<%
String u=request.getParameter("user");
String p=request. getParameter("pass");
Class .for Name("oracle.jdbc.OracleDriver");
Connection
conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:project","scot
t","tiger");
String query="select * from USER_DETAILS2 where username=? and pass=?";
Prepared Statement ps = conn. Prepare Statement(query);
ps.set String(1,u); ps. set String(2,p);
ResultSet rs =ps. execute Query();
if(rs.next()){
session.setAttribute("email", rs.getString("email"));
session.setAttribute("name", rs.getString("username"));
%>
<jsp:forward page="choice.jsp"/>
<%
}
else
{
out.println("<b>invalid username/password</b>");
%>
<jsp:forward page="signup.jsp"/>
<%
}
conn.close();
%>
<%@include file="foot.jsp" %></b>
</body>
</html>
COICE.JSP
<%@include file="head.jsp" %>
<body background="im.jpg">
</body>
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg">
<%
session.setAttribute("sno", 1);
%>
<a href="user.jsp" style="padding-left:1100px;"><input type="button" value="Sign
Out" style="color:green;background:#F1F0D1;padding-top:5px;padding-
right:5px;padding-bottom:5px;padding-left:5px;border-
radius:4px;border:none;border-bottom:4px solid
#27aE60;cursor:pointer;height:40px;width:100px; "></a>
<h2 style="text-align:center;">C language test:</h2>
<h1 style="padding-left:500px;"> INSTRUCTIONS:</h1>
<b style="padding-left:540px;">1. The test contains 10 questions.</b><br>
<b style="padding-left:540px;">2. Each question is of 1 mark.</b><br>
<b style="padding-left:540px;">3. Only one answer is correct for each
question.</b><br>
<b style="padding-left:540px;">4. The test is allowed only once.</b><br>
<br>
</body>
</html>
CHECKC.JSP
<!DOCTYPE html>
<%@page import="java.sql.*"%>
<html>
<%@include file="head.jsp" %>
<title>C Quiz</title>
<body background="im.jpg">
<b>
<a href="choice.jsp"><input type="button" value="Home"
style="color:green;background:#F1F0D1;padding-top:5px;padding-
right:5px;padding-bottom:5px;padding-left:5px;border-
radius:4px;border:none;border-bottom:4px solid
#27aE60;cursor:pointer;height:40px;width:100px;margin-right:30px; "></a>
<a href="viewcresult.jsp"><input type="button" value="View Result"
style="color:green;background:#F1F0D1;padding-top:5px;padding-
right:5px;padding-bottom:5px;padding-left:5px;border-
radius:4px;border:none;border-bottom:4px solid
#27aE60;cursor:pointer;height:40px;width:100px; "></a><br><br><br>
<%
String s=(String)session.getAttribute("email");
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query2="select * from c_answers where email=?";
PreparedStatement ps=conn.prepareStatement(query2);
ps.setString(1,s);
ResultSet rs=ps.executeQuery();
if ( rs.next()){
out.println("Not allowed. You have already given the test.");
}
else{
%>
<jsp:forward page="cques.jsp"></jsp:forward>;
<%
}
conn.close();
%>
</b>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<%@include file="foot.jsp" %>
</body>
</html>
C-QUES.JSP
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg">
<h2>C language test:</h2>
<%
Integer sn;
sn = (Integer)session.getAttribute("sno");
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query1="select * from c_questions where SNO=? ";
String query2="select * from c_questions order by SNO";
PreparedStatement st1=conn.prepareStatement(query1);
PreparedStatement st2=conn.prepareStatement(query2);
st1.setInt(1,(int)sn);
ResultSet rs1=st1.executeQuery();
ResultSet rs2=st2.executeQuery();
int x=0;
while(rs2.next())
x=rs2.getInt("SNO");
if(rs1.next())
{
if(((int)sn)<x)
{sn++;
session.setAttribute("sno",sn);
String ques=rs1.getString("question");
String a=rs1.getString("opt1");
String b=rs1.getString("opt2");
String c=rs1.getString("opt3");
String d=rs1.getString("opt4");
String correct=rs1.getString("correct_opt");
session.setAttribute("correctans", correct);
%>
<form method="post" action="savec.jsp">
<b><i><%out.println("Question"+(sn-1)+". "+ques);%></i></b>
<table>
<tr><td style="text-align:right;"><input type="radio" name="myradio"
value="<%=a%>"></td><td><b><%=a%></b></td></tr>
<tr><td style="text-align:right;"><input type="radio" name="myradio"
value="<%=b%>"></td><td><b><%=b%></b></td></tr>
<tr><td style="text-align:right;"><input type="radio" name="myradio"
value="<%=c%>"></td><td><b><%=c%></b></td></tr>
<tr><td style="text-align:right;"><input type="radio" name="myradio"
value="<%=d%>"></td><td><b><%=d%></b></td></tr>
<tr><td><input type="submit" value="Next Question"></td><td><input type="reset"
value="Clear"></td></tr>
</table>
</form>
<%
}
else if(((int)sn)==x)
{
%>
<jsp:forward page="lastcques.jsp"></jsp:forward>;
<%
}}
conn.close();
%>
<br><br><br><br>
<%@include file="foot.jsp" %>
</body>
</html>
SAVEC.JSP
<%@page import="java.sql.*"%>
<html>
<body background="im.jpg">
<%@include file="head.jsp" %>
<%
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=
DriverManager.getConnection(url, user, password);
String query ="insert into c_answers values(?,?,?,?) ";
String e="";
PreparedStatement st=conn.prepareStatement(query);
if(((String)request.getParameter("myradio"))==null){
e="Not Attempted";
st.setInt(1,((Integer)(session.getAttribute("sno")))-1);
st.setString(2,(String)session.getAttribute("email"));
st.setString(3,e);
st.setString(4,(String)session.getAttribute("correctans"));
}
else {
e=(String)request.getParameter("myradio");
st.setInt(1,((Integer)(session.getAttribute("sno")))-1);
st.setString(2,(String)session.getAttribute("email"));
st.setString(3,e);
st.setString(4,(String)session.getAttribute("correctans"));
}
st.executeUpdate();
session.setAttribute("sn",1);
conn.close();
%>
<jsp:forward page="cques.jsp"/>
<%@include file="foot.jsp" %>
</body>
</html>
LASTCQUES.JSP
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg">
<h2>C language test:</h2>
<%
Integer sn;
sn=(Integer)session.getAttribute("sno");
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query="select * from c_questions where sno=?";
PreparedStatement ps=conn.prepareStatement(query);
ps.setInt(1,sn);
ResultSet rs=ps.executeQuery();
if(rs.next()){
String ques=rs.getString("question");
String a=rs.getString("opt1");
String b=rs.getString("opt2");
String c=rs.getString("opt3");
String d=rs.getString("opt4");
String correct=rs.getString("correct_opt");
session.setAttribute("ans",correct);
%>
</body>
</html>
SAVELASTCQUES.JSP
<%@page import="java.sql.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg"><b>
<%
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query ="insert into c_answers values(?,?,?,?)";
String e="";
PreparedStatement st=conn.prepareStatement(query);
if((String)request.getParameter("myradio")==null){
e="Not Attempted";
st.setInt(1,(Integer)(session.getAttribute("sno")));
st.setString(2,(String)session.getAttribute("email"));
st.setString(3,e);
st.setString(4,(String)session.getAttribute("correctans"));
}
else {
e=(String)request.getParameter("myradio");
st.setInt(1,(Integer)(session.getAttribute("sno")));
st.setString(2,(String)session.getAttribute("email"));
st.setString(3,e);
st.setString(4,(String)session.getAttribute("correctans"));
}
st.executeUpdate();
conn.close();
%>
<jsp:forward page="calculatecresult.jsp"></jsp:forward>
<%@include file="foot.jsp" %>
</b>
</body>
</html>
CALCULATECRESULT.JSP
<!DOCTYPE html>
<%@page import="java.sql.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
<%@include file="head.jsp" %>
<title>C Quiz</title>
<body background="im.jpg">
<b>
PreparedStatement st=conn.prepareStatement(query1);
PreparedStatement st2=conn.prepareStatement(query2);
st.setString(1, (String)session.getAttribute("email"));
ResultSet rs1=st.executeQuery();
ResultSet rs2=st2.executeQuery();
int c=0 ;int un=0;int w=0;
while(rs1.next() && rs2.next())
{
if(rs1.getString("userans").equals("Not Attempted")){
un++;
}
else if(rs1.getString("userans").equals(rs2.getString("correct_opt"))){
c++;
}
else {
w++;
}
}
out.println("<br><br>"+"<b>Total questions="+(un+c+w)+"<br>Correct
answers="+c+"<br>Wrong answers="+(w)+"<br>Unattempted
Questions="+un+"<br><br>");
%>
Total Marks Obtained: <%=c%>/<%=un+c+w%>
<%
int temp=un+c+w;
session.setAttribute("noc", c);
session.setAttribute("temp",temp);
%>
</b></body>
</html>
<%@include file="foot.jsp" %>
ADMIN2.JSP
<!DOCTYPE html>
<html>
<head>
<title>Online Evaluation</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body background="im.jpg">
<br>
</fieldset>
</form>
</body>
</body><br><br><br><br>
<%@include file="foot.jsp" %>
</html>
ADMIN.JSP
<!DOCTYPE html>
<html>
<head>
<title>Online Evaluation</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body background="im.jpg">
<br>
<img src="h2.jpg" width="1300" height="150"><br><br>
<a href="index.html">HOMEPAGE</a>
<br>
<h1>modify c and java questions</h1>
<br>
<%
String u=request.getParameter("user_admin");
String p=request.getParameter("pass_admin");
if(u.equals("system") && p.equals("system")){
%>
<br>
<a href="modifyc.jsp"><img src="1.jpg" width="300" height="240"></a>
&nbs
p;
<a href="modifyjava.jsp"><img src="2.jpg" width="400" height="240"></a>
<%
}
else {
out.println("Incorrect username/password");
}
%>
</body><br><br>
<%@include file="foot.jsp" %>
</html>
MODIFYC.JSP
<!DOCTYPE html>
<%@include file="head.jsp" %>
<html>
<head>
<title>Online Evaluation</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body background="im.jpg">
<a href="index.html">HOMEPAGE</a><br><br>
<br><br>
<fieldset>
<legend><b>modify c questions:</b></legend><br>
<br><br><fieldset><br>
<a href="updatejavaques.jsp"> Update Questions </a>
<br>
<br>
<a href="deletejavaques.jsp"> Delete Questions </a>
<br>
<br>
<a href="viewdetailsjavauser.jsp"> View User details </a><br>
<br>
</fieldset>
</body><br><br><br><br><br><br><br>
<%@include file="foot.jsp" %>
</html>
UPDATECQUES.JSP
<fieldset>
<legend> Enter details of question here: </legend>
<form action="ucq.jsp" method="post">
S.No.-
&nbs
p;
<input type="text" name="snumber"><br>
<br>
Question
&nbs
p;
<input type="text" size="100" style="height: 100px" name="question"><br>
<br>
Option a)
<input type="text" size="50" name="opt1"><br>
<br>
Option b)
<input type="text" size="50" name="opt2"><br>
<br>
Option c)
<input type="text" size="50" name="opt3"><br>
<br>
Option d)
<input type="text" size="50" name="opt4"><br>
<br>
Correct Answer-
<input type="text" size="50" name="correct_opt"><br>
<br>
<input type="submit" value="Update"><a href="viewcquestions.jsp"><input
type="button" value="View Questions"></a>
<br>
</form>
</fieldset>
</body>
</html>
<%@include file="foot.jsp" %>
UCQ.JSP
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg">
<b>
<a href="modifyc.jsp">HOME</a><br>
<a href="updatecques.jsp">ADD MORE QUESTIONS</a><br>
<a href="deletecques.jsp">DELETE QUESTIONS</a><br>
<a href="viewcquestions.jsp">VIEW QUESTIONS</a><br>
<br>
<%
try{
String sn=request.getParameter("snumber");
int sno=Integer.parseInt(sn);
String q=request.getParameter("question");
String opt1=request.getParameter("opt1");
String opt2=request.getParameter("opt2");
String opt3=request.getParameter("opt3");
String opt4=request.getParameter("opt4");
String correct_opt=request.getParameter("correct_opt");
Class.forName("oracle.jdbc.OracleDriver");
Connection
conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:project","scot
t","tiger");
String query="insert into c_questions values(?,?,?,?,?,?,?)";
PreparedStatement ps=conn.prepareStatement(query);
ps.setInt(1,sno);
ps.setString(2,q);
ps.setString(3,opt1);
ps.setString(4,opt2);
ps.setString(5,opt3);
ps.setString(6,opt4);
ps.setString(7,correct_opt);
ps.executeUpdate();
out.println("Question Added!");
conn.close();
}
catch(Exception e){
System.out.println(e);
}
%>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
<%@include file="foot.jsp" %>
</b>
</body>
</html>
DELETE C-QUES.JSP
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<!DOCTYPE html>
<html>
<head>
<title>Modify C database</title>
</head>
<body background="im.jpg">
<h2>C questions database:</h2>
<br>
<%
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query="select * from c_questions";
PreparedStatement ps=conn.prepareStatement(query);
ResultSet rs=ps.executeQuery();
while (rs.next()){
String sno=rs.getString("sno");
String ques=rs.getString("question");
String a=rs.getString("opt1");
String b=rs.getString("opt2");
String c=rs.getString("opt3");
String d=rs.getString("opt4");
String correct=rs.getString("correct_opt");
%>
<br>
<fieldset>
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query="delete from c_questions where SNO=?";
PreparedStatement ps=conn.prepareStatement(query);
ps.setInt(1,c);
ps.executeUpdate();
conn.close();
%>
<br><br>
"Question deleted!!"<br><br><br><br><br><br><br><br><br>
<%@include file="foot.jsp" %>
</b>
</body>
</html>
VIEWDETAILSCUSER.JSP
<!DOCTYPE html>
<%@page import="java.sql.*"%>
<html>
<head>
<title>Online Evaluation</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body background="im.jpg">
<img src="h2.jpg" width="1350" height="150">
<br>
<%
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query="select * from user_details2 ";
PreparedStatement ps=conn.prepareStatement(query);
ResultSet rs=ps.executeQuery();
while (rs.next()){
String username=rs.getString("username");
String email=rs.getString("email");
%>
<%
}
conn.close();
%>
<br>
<fieldset>
<legend> Enter email ID of user you whose details you wish to view:</legend>
<form action="viewcuser.jsp" method="post">
<p>Email ID:</p><input type="text" name="email"><br>
<br>
<input type="submit" value="View">
<br>
<br>
</form>
</fieldset>
</body><br><br><br><br><br>
</html>
<%@include file="foot.jsp" %>
VIEW C-USER.JSP
<!DOCTYPE html>
<%@page import="java.sql.*"%>
<html>
<%@include file="head.jsp" %>
<a href="modifyc.jsp">HOME</a>
<title>Modify C database</title>
<h2>Detailed result: </h2>
<br>
<body background="im.jpg"><b>
<br>
<%
String email=request.getParameter("email");
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query1="select * from c_questions";
String query2="select * from c_answers where email=?";
PreparedStatement ps1=conn.prepareStatement(query1);
PreparedStatement ps2=conn.prepareStatement(query2);
ps2.setString(1,email);
ResultSet rs1=ps1.executeQuery();
ResultSet rs2=ps2.executeQuery();
int cnum=0;
<%
}
out.println("Number of correct answers: "+cnum);
conn.close();
%>
</b>
<%@include file="foot.jsp" %>
</body>
</html>
MODIFY JAVA.JSP
<!DOCTYPE html>
<%@include file="head.jsp" %>
<html>
<head>
<title>Online Evaluation</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body background="im.jpg">
<a href="index.html">HOMEPAGE</a><br><br>
<br><br><fieldset><br>
<a href="updatejavaques.jsp"> Update Questions </a>
<br>
<br>
<a href="deletejavaques.jsp"> Delete Questions </a>
<br>
<br>
<a href="viewdetailsjavauser.jsp"> View User details </a><br>
<br>
</fieldset>
</body><br><br><br><br><br><br><br>
<%@include file="foot.jsp" %>
</html>
UPDATE JAVA QUES.JSP
<%@include file="head.jsp" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Modify C Module</title>
</head>
<body background="im.jpg">
<fieldset>
<legend> Enter details of question here: </legend><br>
<form action="ujq.jsp" method="post">
S.No.-
&nbs
p;
<input type="text" name="snumber"><br>
<br>
Question
&nbs
p;
<input type="text" size="100" style="height: 100px" name="question"><br>
<br>
Option a)
<input type="text" size="50" name="opt1"><br>
<br>
Option b)
<input type="text" size="50" name="opt2"><br>
<br>
Option c)
<input type="text" size="50" name="opt3"><br>
<br>
Option d)
<input type="text" size="50" name="opt4"><br>
<br>
Correct Answer-
<input type="text" size="50" name="correct_opt"><br>
<br>
<input type="submit" value="Update">
<br>
</form>
</fieldset>
</body>
</html>
<%@include file="foot.jsp" %>
UJQ.JSP
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg"><b>
<a href="modifyjava.jsp">HOME</a><br>
<a href="updatejavaques.jsp">add more JAVA question</a><br>
<a href="deletejavaques.jsp">delete JAVA question</a><br>
<a href="deletecques.jsp">VIEW JAVA
QUESTIONS</a><br><br>
<%
String sn=request.getParameter("snumber");
int sno=Integer.parseInt(sn);
String q=request.getParameter("question");
String opt1=request.getParameter("opt1");
String opt2=request.getParameter("opt2");
String opt3=request.getParameter("opt3");
String opt4=request.getParameter("opt4");
String correct_opt=request.getParameter("correct_opt");
Class.forName("oracle.jdbc.OracleDriver");
Connection
conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:project","scot
t","tiger");
String query="insert into java_questions values(?,?,?,?,?,?,?)";
PreparedStatement ps=conn.prepareStatement(query);
ps.setInt(1,sno);
ps.setString(2,q);
ps.setString(3,opt1);
ps.setString(4,opt2);
ps.setString(5,opt3);
ps.setString(6,opt4);
ps.setString(7,correct_opt);
ps.executeUpdate();
out.println("Question Added!");
conn.close();
%>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
<%@include file="foot.jsp" %>
</b>
</body>
</html>
DELETEJAVAQUES.JSP
<!DOCTYPE html>
<%@page import="java.sql.*"%>
<html>
<%@include file="head.jsp" %>
<head>
<title>Modify JAVA database</title>
</head>
<body background="im.jpg">
<h2>Java questions database:</h2>
<br>
<%
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query="select * from java_questions";
PreparedStatement ps=conn.prepareStatement(query);
ResultSet rs=ps.executeQuery();
while (rs.next()){
String sno=rs.getString("sno");
String ques=rs.getString("question");
String a=rs.getString("opt1");
String b=rs.getString("opt2");
String c=rs.getString("opt3");
String d=rs.getString("opt4");
String correct=rs.getString("correct_opt");
%>
<%
}
conn.close();
%>
<fieldset>
<form action="djq.jsp" method="post"><br>
Enter the question number you wish to delete:
<input type="text" name="delete"><br>
<br>
<input type="submit" value="Delete">
<br><br>
</form>
</fieldset>
</body>
</html>
DJQ.JSP
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg">
<a href="modifyjava.jsp">HOME</a>
<%
int del=Integer.parseInt(request.getParameter("delete"));
Class.forName("oracle.jdbc.OracleDriver");
Connection
conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:project","scot
t","tiger");
String query="delete from java_questions where SNO=?";
PreparedStatement ps=conn.prepareStatement(query);
ps.setInt(1,del);
ps.executeUpdate();
conn.close();
%>
<br><br>
Question deleted!!<br><br><br><br><br><br><br><br><br>
<%@include file="foot.jsp" %>
</body>
</html>
VIEW DETAILS JAVA USER.JSP
<!DOCTYPE html>
<%@page import="java.sql.*"%>
<html>
<head>
<title>Online Evaluation</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<img src="h2.jpg" width="1350" height="150">
<br>
<body background="im.jpg">
<br>
<%
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query="select * from user_details2";
PreparedStatement ps=conn.prepareStatement(query);
ResultSet rs=ps.executeQuery();
while (rs.next()){
String username=rs.getString("username");
String email=rs.getString("email");
%>
<%
}
conn.close();
%>
<form action="viewjavauser.jsp" method="post"><br>
<fieldset>
<legend> Enter email ID of user you whose details you wish to view:</legend>
<br>
Email ID: <input type="email" name="email"><br>
<br>
<input type="submit" value="View">
<br>
<br>
</fieldset>
</form>
</body><br><br><br><br><br>
</html>
<%@include file="foot.jsp" %>
VIEW JAVA USER.JSP
<!DOCTYPE html>
<%@page import="java.sql.*" %>
<html>
<%@include file="head.jsp" %>
<a href="modifyc.jsp">HOME</a>
<title>Modify C database</title>
<h2>Detailed result: </h2>
<br>
<body background="im.jpg"><b>
<br>
<%
String email=request.getParameter("email");
String driver="oracle.jdbc.OracleDriver";
String url="jdbc:oracle:thin:@localhost:1521:project";
String user="scott"; String password="tiger";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url, user, password);
String query1="select * from java_questions";
String query2="select * from java_answers where email=?";
PreparedStatement ps1=conn.prepareStatement(query1);
PreparedStatement ps2=conn.prepareStatement(query2);
ps2.setString(1,email);
ResultSet rs1=ps1.executeQuery();
ResultSet rs2=ps2.executeQuery();
int cnum=0;
<%
}
out.println("Number of correct answers: "+cnum);
conn.close();
%>
</b>
<!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<img src="h2.jpg" width="1350" height="150"><br><br><br><br>
<body background="im.jpg">
<fieldset>
<legend> Enter user_name and email: </legend><br><br>
<form action="setnewpass.jsp" method="post">
User name
<input type="text" name="user"><br>
<br>
Email
<input type="email" name="email"><br>
<br>
New Password <input type="password"
name="newpass"><br>
<br>
Confirm Password <input type="password" name="confirmpass"><br>
<br>
<br>
<input type="submit" value="Update Account">
</form>
<br></fieldset>
</body>
</html>
SET NEW PASS.JSP
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg">
<%
String u=request.getParameter("user");
String e=request.getParameter("email");
String p1=request.getParameter("newpass");
String p2=request.getParameter("confirmpass");
if(p1.equals(p2)) {
Class.forName("oracle.jdbc.OracleDriver");
Connection
conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:project","scot
t","tiger");
PreparedStatement ps=conn.prepareStatement(sql);
ps.setString(1,p1);
ps.setString(2,e);
ps.setString(3,u);
ps.executeUpdate();
}
else {
response.sendRedirect("index.html");
}
%>
</body>
<jsp:forward page="user.jsp"/>
<%@include file="foot.jsp" %>
</html>
HEAD.JSP
</body>
</html>
FOOT.JSP
<!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1 style="text-align:center;">
<font face="verdana" size=2>
Copyright © [email protected]
</font>
</h1>
</body>
</html>
ERROR.JSP
<%
out.println(exception);
%>
CONCLSION
The Online Examination System is developed using Java and Oracle 10g standard
edition fully meets the objectives of the system for which it has been developed. The
system has reached a steady state where all bugs have been eliminated. As far as design
is concerned no design is complete ever and there are chances of improvement each
moment. However, performing all the necessary testing, we will conclude that our
design will implement properly that it absolutely was made.
APPLICATIONS
BIBLIOGRAPHY/REFERENCES
Thanks to Mr. NAJMUL HASAN Sir who guide me in my project and give me
suggestions which help me a lot, And my Trainer Mr. Hasan Sir who teach me a lot,
And my all Respected teachers.
References
www.youtube.com
https://en.wikipedia.org/wiki/Spiral_model
https://www.blog.epravesh.com/reasons-online-examination-system-schoolscolleges-university/