OnlineExaminationProject Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 97
At a glance
Powered by AI
The project report discusses developing an online examination system using Java and Oracle 10g.

The project report is about developing an online examination system to conduct exams online.

The software development methodology used is the Spiral Model.

Project 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:

Department of Computer Science & Informatics


University of Kota, Kota
2017-18
DECLARATION

This is to certify that this project report entitled “STUDENT PERFORMANCE


ENHANCEMENT” which is submitted by Anpurna Parashar And Maninder Kaur
in partial fulfillment of the requirement for the award of MCA CS to University of Kota,
Kota, Delhi comprises only my original work and due acknowledgement has been made
in text to all material used.

Date: 30/04/2018

Anpurna Parashar
Maninder Kaur
Register No. 3 & 15
SUBMITTED TO:

Prof. Reena Dadhich ma’am


Prof. O.P. Rishi sir
H.O.D (COMPUTER SCIENCE)
CERTIFICATE

This is to certify that this project report entitled “STUDENT PERFORMANCE


ENHANCEMENT” which is submitted by ANPURNA PARASHAR & MANINDER
KAUR(1&15) in partial fulfillment of the requirement for the award of MCA in CSI
to University of Kota, Kota; Delhi is a record of student’s own work carried out by
him under my supervision. The matter embodied in this report is original and has
not been submitted for the award of any other degree.

Date: 30/04/2018

(Signature)

Guide & Lecturer


ACKNOWLEDGEMENT

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

 Computerized vs. Manual Examination System


 Time saving
 Increased efficiency
 Allows neat handling of data rather than error prone records.
 Decreases overhead
 Accurate

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.

What is Online Exams System all about?

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.

 Responses or the answers by the candidates can be checked automatically and


instantly.

 It will reduce paper work to be an integrated Online Examination System.

 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 DEVELOPMENT METHODOLOGY

The establishment and use of sound engineering principles in order to obtain


economically developed software that is reliable and works efficiently on real
machines is called software engineering.
Software engineering is the discipline whose aim is:

1. Production of quality software


2. software that is delivered on time
3. cost within the budget
4. satisfies all requirements.

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

 In this project Spiral Model is followed

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:

In later publications, Boehm describes the spiral model as a "process model


generator", where choices based on a project's risks generate an appropriate
process model for the project. Thus, the incremental, waterfall, prototyping, and
other process models are special cases of the spiral model that fit the risk patterns
of certain projects.
Boehm also identifies a number of misconceptions arising from oversimplifications
in the original spiral model diagram. He says the most dangerous of these
misconceptions are:
 that the spiral is simply a sequence of waterfall increments;
 that all project activities follow a single spiral sequence; and
 that every activity in the diagram must be performed, and in the order
shown.
While these misconceptions may fit the risk patterns of a few projects, they are not
true for most projects.
In a National Research Council report this model was extended to include risks
related to human users.
To better distinguish them from "hazardous spiral look-alikes", Boehm lists six
characteristics common to all authentic applications of the spiral model.

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.

Risk Determines Level of Effort


For any project activity (e.g., requirements analysis, design, prototyping, testing),
the project team must decide how much effort is enough. In authentic spiral
process cycles, these decisions are made by minimizing overall risk.
For example, investing additional time testing a software product often reduces the
risk due to the marketplace rejecting a shoddy product. However, additional testing
time might increase the risk due to a competitor's early market entry. From a spiral
model perspective, testing should be performed until the total risk is minimized,
and no further.
Software Requirement Specification (SRS)

1. Introduction:
The following subsections of the SRS document provide an overview of the entire
SRS.

i) Purpose: The purpose of the project is to provide online facility to Institutes to


conduct online exams and to Students to give online exams. Institutes can enter
and edit the questions along with the students list. Also they can view the result.
Students can login and give their respective exams and view their score then and
there. Others can view sample papers to get look and feel of the online
examination system.

ii) Scope: The website to conduct online examination is “STUDENT


PERFORMANCE ENHANCMENT”. This website provides facility to institutes
to conduct online exams by providing a unique id to each institute. The institute
provides questions along with positive and negative marks. Institute also enters the
list of eligible students. All the information entered
can be later edited by the institute. In turn student can login with their id, name and
institute id to give the exam sand can view their result then and there. Institutes can
also view the result of their
students.
Benefits: This website reduces the manual work, maintaining accuracy, increasing
efficiency and saving time. Also institutes need not go to develop a new software
each time, instead they just register and conduct a test. For students, it saves time
of going too far away centers and also they can view their result then and there.

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.

(iii) There is a screen for displaying information regarding entries to be made by


institutes.

(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.

(viii) There is a screen for taking exam for the students.

(ix) There is a screen for displaying of results of students after taking the exam.

(x) Hardware interfaces.

(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.

(xi) Software interfaces


(i) Any windows based operating system.
(ii) MS Access 2000 as the DBMS-for database.
(iii) IDE (NET BEANS) for developing code.
(xii) Communications interface: None
(xiii) Memory Constraints: At least 512 MB RAM and 5 MB space on hard disk
will be required for running the application.
(xv) Site Adaptation Requirements: Web browser with cookies enabled.

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.

iii.) User Characteristics:

a. Educational level: Users should be comfortable with the English language.


b. Experience: Users should have prior information regarding the online
examinations.
c. Skills: Users should have basic knowledge and should be comfort table
using general purpose applications on computers.

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.

vi.) Apportioning of Requirements: The future versions of the website will be


having a better database to handle larger number of records, in a more secure way,
also separate profile will be maintained later for all students so that he can view all
his previous test performances.

3. Specific Requirements: This section provides software requirements to a


Level of detail sufficient to enable designers to design the system and
Testers to test the system.

External Interface Requirements: User Interfaces:

*Student Registration Screen: Various fields available on this screen will be:
*User Name
*Password
*Mobile
*Email
*City

*Student Login Screen: Fields available on this screen are:


*User Name
*Password

*Entering Questions: Various Fields are:


*Questions
*Options (4)
*Correct Answer
*Exam Details Screen: Various Fields are:
*No. Of Questions
*Correct answers
*Wrong answers
*Un-attempted questions

*Admin Login Screen: Various Fields are:


*UserName
*Password

*Adding Exam Question Screen: Various Fields are:


*Question
*Option-1
*Option-2
*Option-3
*Option-4
*Correct answer

*Deleting Exam Question Screen: Various Fields are:


*Questions
*Option-1
*Option-2
*Option-3
*Option-4
*Correct answer
*Delete by sno. Option

*View user Details Screen: Various Fields are:


*Username
*Email ID
*View details by email ID option
*Hardware interfaces:
*Support for printer for printing resultsthen and there.
*Screen resolution of at least 800X600 is required for proper and complete
viewing of screens. Higher resolution will be accepted.

*Software interfaces:
*Any windows based operating system.
*ORACLE 10g STANDERD EDDITION as the DBMS-for database.
*IDE (ECLIPES) for developing code.

*Communications interfaces
*None

ii.) Software Product Features:

 Validity Checks: JavaScript provides validity checks for various fields in


the forms.
 Sequencing Information: All the information regarding exam details,
student list, question details, display of result should be handled
sequentially that is data should be stored only in a particular
Sequence to avoid any inconvenience
 Error Handling: If any of the validations or sequencing flows does not
hold true then appropriate error messages will be prompted to the
user for doing the needful.

iii.) Performance Requirements: This subsection specifies numerical


requirements placed on the software or on the human interaction with the
software, as a whole. Numerical requirements will include:
*300 terminals will be supported at a time
*Only text information will be supported (HTTP)
*All the transactions will be processed within seconds.
iv.) Design Constraints: None

v.) Software System Attributes:


*Security: Only authorized users will be able to access the website by entering
the correct login name and corresponding password.

*Maintainability: The website can be maintained in present or future. It will easy


to incorporate new requirements in the individual modules.

*Portability: As the website is online so will be easily portable on various


systems.

*Other Requirements: None


DATA FLOW DIAGRAM

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.

PROCESS: - A circle or bubble represents a process that transforms incoming data


to outgoing data. Process shows a part of the system that transforms inputs to outputs.

EXTERNAL ENTITY: - A square defines a source or destination of system data.


External entities represent any entity that supplies or receive information from the
system but is not a part of the system.

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.

The technologies used to develop this site are:-

FRONTEND: - (LANGUAGES)

J2EE:- Java 2 Enterprise Edition is a programming platform— part of the Java


Platform for developing and running distributed multitier architecture Java
applications, based largely on modular software components running on an
application server.

APACHE TOMCAT: - Web-server for running j2ee applications over network.

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)

ORACLE 10g STANDARD EDITION: - Oracle 10g Standard Edition is a database


which is used in this project.

SQL (STANDARD QUERY LANGUAGE):- SQL is a language which use to


Communicate with databases.
NON-FUNCTIONAL REQUIREMENTS

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

It means the extent to which program performs with required precision.


The website developed should be extremely reliable and secure so that information
about any questions etc. is not leaked before the actual exam is held.

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

It is effort required to modify operational program. The whole website should be


made using independent modules so that any changes done in 1 module should not
affect the other one and new modules can be added easily to increase functionality.

What contribution would the project make?

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.

Computerized vs. Manual Examination System


Automated process of examination is much better than the manual system as it has
following
Advantages:
 Time saving
 Increased efficiency
 Allows neat handling of data rather than error prone records.
 Decreases overhead
 Accurate
How STUDENT PERFORMANCE ENHANSMENT is better than
previous 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

<! DOCTYPE html>


<html>
<head>
<meta char set="ISO-8859-1">
<title>Insert title here</title>
</head>
<body background="im.jpg">
<img style="padding-top: 5px; text-align: center;" src="h2.jpg" width="1300"
height="150">

<marquee>
<h1>WELCOME TO ONLINE EVALUATIONSYSTEM</h1>
</marquee>
<br> <br><br><br>

<p style="text-align: center ;">< a href ="user.jsp"><img height="40" width="170"


src="user.jpg"></a>

<a href="admin2.jsp"><img height="40" width="170" src="admin.jpg"


style="margin-left: 120px"></a></p>
<p style="text-align: center; font-size: 20px; margin-top: 120px">

<b><i>Copyright © [email protected]</i></b></p>

</body>
</html>
USER.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="1350" height="150">


<br>
<marquee><h1>WELCOME TO ONLINE EVALUATION
SYSTEM</h1></marquee>

<field set style="text-align: center ;">


<legend> Login here: </legend>
<br>
<form action="login.jsp" method="post"><br>
<b>Username</b><input type="text" name="user"><br>
<br>
<b>Password &nbsp ;< /b><input type="password" name="pass"><br>
<br>
<input type="submit" value="Sign in">
<br>
<br>
<b>To register</b><a h ref="signup.jsp">Click Here </a><br>
<br>
<b>Forgot password? </b><a h ref="forgotpass.jsp">Click Here</a><br>
</form>
</fieldset>
</body>
</html>
<%@include file="foot.jsp" %>
<%@page import="java.sql.*"%>
SIGNUP.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 background="im.jpg">
<img src="h2.jpg" width="1350" height="150">

<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 &nbsp;</td><td><input type="text"
name="user"></td></tr>
<tr><td>Password &nbsp;</td><td><input type="password"
name="pass"></td></tr>
<tr><td>Mobile &nbsp; &nbsp; &nbsp;</td><td><input type="number"
name="mobile"></td></tr>
<tr><td>Email* &nbsp; &nbsp; &nbsp; &nbsp;</td><td><input type="email"
name="email"></td></tr>
<tr><td>City &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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">

<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><br><br>

<a href="beginc.jsp" style="padding-left:350px;"><img src="1.jpg" width="300"


height="300"></a>

<a href="beginjava.jsp"><img src="2.jpg" width="400" height="300"></a>

</body>

<%@include file="foot.jsp" %>


BEGINC.JSP

<%@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>

<a href="checkc.jsp"><img src="start.jpg" width="200" height="65" style="margin-


left:600px;" ></a>
<br>
<%@include file="foot.jsp" %>

</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);
%>

<form method="post" action="savelastcques.jsp">


<%out.println("Q"+sn+". "+ques);%><br>
<input type="radio" name="myradio" value="<%=a%>"><%=a%><br>
<input type="radio" name="myradio" value="<%=b%>"><%=b%><br>
<input type="radio" name="myradio" value="<%=c%>"><%=c%><br>
<input type="radio" name="myradio" value="<%=d%>"><%=d%><br>
<input type="submit" value="Submit">
<input type="reset" value="Clear">
</form>
<%
}
%>
<%@include file="foot.jsp" %>

</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>

<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 Detailed 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:200px; "></a>
<%
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_answers where email=?";
String query2="select * from c_questions";

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>

<img src="h2.jpg" width="1350" height="150">


<br>
<marquee><h1>WELCOME TO ONLINE EVALUATION
SYSTEM</h1></marquee>
<br>
<br><br>

<form action="admin.jsp" method="post"><br>


<fieldset>
<legend>admin Login here:</legend>
<br>

Username <input type="text" name="user_admin"><br>


<br>
Password &nbsp;<input type="password" name="pass_admin"><br>
<br>
<input type="submit" value="Sign in">

</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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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>

<a href="updatecques.jsp"> Update Questions </a>


<br>
<br>
<a href="deletecques.jsp"> Delete Questions </a>
<br>
<br>
<a href="viewdetailscuser.jsp"> View User details </a><br>
<br>
</fieldset>
</body><br><br><br><br><br><br><br>
<%@include file="foot.jsp" %>
</html>
MODIFYJAVA.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>
UPDATECQUES.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>
<form action="ucq.jsp" method="post">
S.No.-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="snumber"><br>
<br>
Question
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;
<input type="text" size="100" style="height: 100px" name="question"><br>
<br>
Option a)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" size="50" name="opt1"><br>
<br>
Option b)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" size="50" name="opt2"><br>
<br>
Option c)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" size="50" name="opt3"><br>
<br>
Option d)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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");
%>

Question <%=sno%>: <%=ques%><br>


a) <%=a%><br>
b) <%=b%><br>
c) <%=c%><br>
d) <%=d%><br>
Correct Choice: <%=correct%><br><br>
<%
}
conn.close();
%>

<br>
<fieldset>

<form action="dcq.jsp" method="post">


Enter the question number you wish to delete:
&nbsp;&nbsp;&nbsp;<input type="text" name="delete"><br>
<br>
<input type="submit" value="Delete">
<br><br>
</form>
</fieldset>

<%@include file="foot.jsp" %>


</body>
</html>
DCQ.JSP
<%@page import="java.sql.*"%>
<%@include file="head.jsp" %>
<html>
<body background="im.jpg">
<b>
<a href="modifyc.jsp">HOME</a><br>
<a href="deletecques.jsp">Delete more questions</a>
<%
int c=Integer.parseInt(request.getParameter("delete"));

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");
%>

User name : <%=username%><br>


Email ID : <%=email%><br><br><br>

<%
}
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;

while (rs1.next()&& rs2.next()){


String sno=rs1.getString("sno");
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");
String userans=rs2.getString("userans");
if(correct.equals(userans)){
cnum++;
}
%>

Question <%=sno%>: <%=ques%><br>


a) <%=a%><br>
b) <%=b%><br>
c) <%=c%><br>
d) <%=d%><br>
Correct Choice: <%=correct%><br>
User's Choice: <%=userans%><br><br>

<%
}
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.-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="snumber"><br>
<br>
Question
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;
<input type="text" size="100" style="height: 100px" name="question"><br>
<br>
Option a)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" size="50" name="opt1"><br>
<br>
Option b)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" size="50" name="opt2"><br>
<br>
Option c)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" size="50" name="opt3"><br>
<br>
Option d)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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");
%>

Question <%=sno%>: <%=ques%><br>


a) <%=a%><br>
b) <%=b%><br>
c) <%=c%><br>
d) <%=d%><br>
Correct Choice: <%=correct%><br><br>

<%
}
conn.close();
%>

<fieldset>
<form action="djq.jsp" method="post"><br>
Enter the question number you wish to delete:
&nbsp;&nbsp;&nbsp;<input type="text" name="delete"><br>
<br>
<input type="submit" value="Delete">
<br><br>
</form>
</fieldset>

<%@include file="foot.jsp" %>

</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");
%>

User name: <%=username%><br>


Email ID: <%=email%><br><br><br>

<%
}
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;

while (rs1.next()&& rs2.next()){


String sno=rs1.getString("sno");
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");
String userans=rs2.getString("userans");
if(correct.equals(userans)){
cnum++;
}
%>

Question <%=sno%>: <%=ques%><br>


a) <%=a%><br>
b) <%=b%><br>
c) <%=c%><br>
d) <%=d%><br>
Correct Choice: <%=correct%><br>
User's Choice: <%=userans%><br><br>

<%
}
out.println("Number of correct answers: "+cnum);
conn.close();
%>
</b>

<%@include file="foot.jsp" %>


</body>
</html>
FORGOTPASS.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>
<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 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<input type="text" name="user"><br>
<br>
Email &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; <input type="email" name="email"><br>
<br>
New Password &nbsp; &nbsp; &nbsp; &nbsp; <input type="password"
name="newpass"><br>
<br>
Confirm Password &nbsp; <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");

String sql="update user_details2 set pass=? where email=? and username=?";

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

<%@page errorPage="error.jsp" %>


<!DOCTYPE html>
<html>
<head>
<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="1300" height="150" style="text-align:center;"><br><br>

</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

<%@ page isErrorPage="true"%>

<%

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/

You might also like