Quiz and Exam Management System
Quiz and Exam Management System
Submitted to
DEPARTMENT OF BACHELOR OF COMPUTER APPLICATION
N.C AUTONOMOUS COLLEGE,JAJPUR
Session:2023-24
2
This is certify that the project entitled “QUIZ & EXAM MANAGEMENT SYSTEM”
requirement BCA 6TH semester project in record of bonfire work carried out by them under my
During this period of project work have sincerely and fully dedicated to their project .Their
Project guide
Mr. Sadiq Khan
Department of Self -financing
3
This project study been completed with the guidance ,help ,advice and suggestion of
many teachers ,well-wishers and friends .It is my sincere to acknowledge all of them.
Mr. Sadiq Khan, faculty in Self-Financing Department ,N.C Autonomous College ,Jajpur for his
guidance and suggestion .He has been a constant source of inspiration and help during my project
study.
MADHUSMITA SAMAL
Class Roll No:BCA-SF-21-020
Exam Roll No:1621BC041
N.C(Auto) College ,Jajpur
4
“Quiz & Exam Management System” for introduction to management is an application that
designed and developed for students and lecturers. The system helps students to take examination.
It helps also lecturers to upload the questions and answers in the database and they can see the
students who fail or pass the exam. The software is developed using Java(Jframe ) programming
In the software we have two module first one is for students and another is for lecturers. To give
exam or quiz student have to register them and then give examination. Exam management system
for introduction to management is constituted of different components for instance login function,
The problem with the current system is that students take their exam manually. This out-dated
system will take long time utilization; the manual procedure used for conducting exam is time
consuming process. More time being used for lecturers to bring the questions papers and answer
sheets and also more time is needed for students in order to write their exam.
5
CONTACT INFORMATION
Participants
6
#Bonafide Certificate
I:DECLARATION
II:CERTIFICATE
III:ACKNOWLEDGEMENT
IV:ABSTRACT
V:LIST OF FIGURE
CHAPTER 1: INTRODUCTION
1.1: BACKGROUND OF STUDY
1.2: PROBLEM STATEMENT
1.3: OBJECTIVES AND SCOPE OF STUDY
1.4: PROJECT RELEVANCY, FEASIBILITY
1.4.1: TECHNICAL FEASIBILITY
1.4.2: OPERATIONALLY FEASIBILITY
1.4.3: ECONOMIC FEASIBILITY
CHAPTER 3: METHODOLOGY
3.1: RESEARCH METHODOLOGY
3.2: PROJECT ACTIVITIES
3.2.1: REQUIREMENT GATHERING STAGE
3.2.2: DESIGN STAGE
3.2.3: BUILD STAGE
3.2.4: TEST STAGE
3.2.5: DEPLOYMENT STAGE
3.2.6: MAINTENANCE STAGE
3.3: TOOLS & TECHONOLOGY
3.3.1: NETBEANS IDE 20
3.3.2: MYSQL 8.0 COMMAND LINE CLIENT
3.3.3.INTRODUCTION OF JAVA
3.3.4.WHAT IS DATABASE?
7
3.3.5.JAVA DATABASE CONECTIVITY
CHAPTER 4: RESULT AND DISCUSSION
4.1: USE CASE DIAGRAM
4.2: SYSTEM FLOW CHART
4.3: DATABASE DESIGN
4.4: TEST TOOLS NEEDED
4.5: INTERFACE DESIGN
4.6: CODING MODULE
CHAPTER 6: REFERENCES
8
LIST OF FIGURES
13 4.12 REGISTRATION
9
CHAPTER 1:
INTRODUCTION
1.1. Background of study
Computerized systems have been increasing in every aspect of education. Information
Technology plays a very important role in nowadays education. Computers and internet have
made dramatic changes in the education system. Information technology enables institution of
high learning to save time and money, and allow the delivery of education with easiness,
anywhere, and anytime. Paper based books are replaced by online and off-line applications. With
computer software, we can be able to have access to huge databases of information. This gives
information fast and easily. In the modern era, technological progress has minimized the
information in the world. Advancement of technology has many advantages in education and all
business industries that use it. With the use of the technology advances, the transaction became
more rapid, accurate and efficient. As time goes by computers have become more useful for
every transaction. Quiz or Exam management system is an application that is designed and
developed for students and lecturers. The system helps students to take examination. It helps also
lecturers to upload the questions and answers in the database and they can see the students who
like defining exam patterns with question banks, defining exam timer, objective question
sections, conducting exams using the computer or mobile devices in a paperless manner. Quiz or
10
Exam management system is a cost-effective, scalable way to convert traditional pen and paper-
Candidates can appear for the exam using any desktop, laptop. Exam results can be generated
instantly for the objective type of questions. It can simplify overall examination management and
result in generation activity. We can use this to conduct assessments, aptitude tests, psychometric
The problem with the current system is that students take their exam manually. This outdated
system will take long time utilization; the manual procedure used for conducting exam is time
consuming process. More time being used for lecturers to bring the questions papers and answer
sheets and also more time is needed for students in order to write their exam, student are not
satisfy with the current system of taking the multiple choice examination. The no accuracy with
current system when student did not use a 2b pencil student are losing they are mark. Using the
manual procedure of conducting examination we are saving the environment by using not more
paper, we are in the world where really need to take care of the environment.
11
1.3. Objectives and scope of study
This project is aimed at developing an quiz or exam management system for introduction to
management for students and lecturers. The purpose of the system is to completely automate the
old manual procedure of conducting exam to a computerized System. I will provide a more
efficient examination system. The system will allow students to register and take the exam. It
enables also lecturers to perform many tasks. The system has several functions. The users will
do the login before using the system. The lecturers can upload questions and answers; he can
view the list of all students who take the exam. He can view the list of students who have marks
it not difficult to get them. Brief I can say the necessary resources needed for the development
and maintenance of the system are available. I am going to use java programming languages and
database.
12
1.4.2. Operationally Feasibility
The project I am developing is operationally feasible as there is no need for users to have good
knowledge in computer before using it. The user can learn and use the system with easiness; he
Besides being technically feasible, developing this system is economically feasible as well. The
development of the system does not require the developers to spend a lot of money. The tools I
will be using to develop the system are not expensive and the software’s are open source. All I
need is time. Even the maintenance of the system will not be expensive. The system is indeed
economically feasible.
13
CHAPTER 2: LITERATURE SURVEY
2.1. Introduction
Computerized systems have been increasing in education nowadays. Information Technology
plays a very important role in education. Computers have made dramatic changes in the learning
system. Information technology enables education institutions to save space and time, and allow
the delivery of education services with easiness, anywhere, and anytime. For instance physical
libraries are replaced by online libraries available to anyone; anywhere in the world students can
interact with lecturers online whether live or via video. With computer software, we can be able
to have access to huge databases of information. This gives fundamental change to the education
system. Information technology makes the exchanges of information fast and easily. With the
growth of IT a lot of data can be found in online library. We don t need to have a physical library
in order to read books. Computers are a powerful tool used in all aspects of our studies. We use
multimedia technologies to convey ideas, build projects. Information technology enables students
provides systems that allow students to perform many tasks in an automatic way and not manually.
Students can take exam using computerized system; they don’t need paper-based exam. They save
14
2.2. Computerized Systems
Technology advances so fast that computers become part of our daily live. People use computers
everywhere, at work, at school and at home. The computerized systems are very efficient, process
huge amount of data and keep big amount of information. Malolos ET .al (2002) says that the
automated systems are important as the time and manual efforts are minimized. Janes(2001)
elaborated that computers are devices that are greatly reliable and very powerful. He said that
computers possess three advantages compared to other equipments in the office. The computers
have these three benefits in the sense that they are faster, more accurate and more economical.
Reyes (2005) stated that perform work manually is time consuming. But using computers make
our task more practical. In Flores (2002) point of view, he defined automation as the replacement
of machine control of human. According to Dioso (2001), computer helps in planning, organizing
and controlling in an intelligent manner. 7 In Ralph M. Stair (1999) point of view, the growing of
technology helps people to perform a lot of tasks with less effort. Gurewich (1999) said that in any
corporation the work is done faster when using database system. With the use of computerized
system everything is done faster compared to tasks that are performed in a manual way. Mane
(2000) said that the invention of the computer made the task easier to perform than by doing it
manually. The computer is very necessary for everyone and it is very god productivity machine.
The data are stored in the computer and users can access the information whenever they are in
need. Bryan (2006) defined the information as a set of people, procedures and resources that
collects processes and distributes information in an organization. They consist of simple manual
information system and as well as computer based information system that uses hardware, software
telecommunication and other forms of information technology. Sender (2002) referred computers
15
as an intelligence amplifier that can free human to use their time effectively. Computers perform
tasks with high speed and accuracy. Thowsand (2005) defined database system as a structured set
of data. These data can be about people, products or event. Adamski (2007) highlighted the benefits
of database by saying it is economical, a lot of information can be retrieved from some amount of
16
CHAPTER 3: METHODOLOGY
3.1 Research Methodology
Main methodology activities held during the research is acquiring information and knowledge
about quiz or exam management system through reading books, and researches that were
previously done in related area. All the research materials were obtained over the internet,
Wikipedia and other websites. Next step taken is reading, comprehending and analyzing literature
review and matching information obtained. This research emphasize quiz or exam management
system, which include usability, user-friendly interface, reliability, costing and meeting needs of
target users.
must incorporate a development strategy that encompasses the process, methods and tools layers
and generic phases. This strategy is often referred to as process model or a software developing
paradigm. A process model for software developing is chosen based on the nature of project and
application, the methods and tools to be used, and the controls and deliverables that are required.
All software development can be characterized as a problem solving loop in which distinct stages
are encountered. Regardless of the process model that is chosen for a software project, all of the
stages coexist simultaneously at some level of detail. The methodology chosen to develop this
system is waterfall model approach. I opted for this method because I found that it is the best for
my project where the stages involved can assist my level of progress. Many developers prefer
waterfall model and widely use it as a development strategy. 11 Waterfall model approach is
chosen because the approach allows the development of the system to be revised after the stages
17
is finished. Once the stages are not satisfied, then going back to the previous stages can be
considered necessary to add or modify any features. The different stages for this model:
client.
18
3.2.2 Design Stage
Plan the programming language, for Example Java, PHP, .net or database like Oracle, MySQL,
client.
The tools required to develop the system are: NetBeans IDE 20 RC, MySQL 8.0 Command Line
Client.
Backend-End :JAVA
Database :MySQL
19
3.3.1 NetBeans IDE 20 RC
The NetBeans IDE is a free and open source software development tool that allow developers to
create enterprise, web, desktop, and mobile applications. The NetBeans IDE 20 RC is an Integrated
Development Environment available for Windows, Mac, Linux, and Solaris. The NetBeans project
consists of an open-source IDE and an application platform which enable me to rapidly create the
MySQL provides APIs for the languages C, C++, Eiffel, Java, Perl, PHP and Python. In addition,
OLE DB and ODBC providers exist for MySQL data connection in the Microsoft environment. A
MySQL .NET Native Provider is also available, which allows native MySQL to .NET access
without the need for OLE DB. MySQL is most commonly used for Web applications and for
embedded applications and has become a popular alternative to proprietary database systems
because of its speed and reliability. MySQL can run on UNIX, Windows and Mac OS. MySQL is
developed, supported and marketed by MySQL AB. The database is available for free under the
terms of the GNU General Public License (GPL) or for a fee to those who do not wish to be bound
20
3.3.3 Back-End:
INTRODUCTION TO JAVA:
Java is a programming language created by James Gosling from Sun Microsystems (Sun) in 1991.
The target of Java is to write a program once and then run this program on multiple operating
systems. The first publicly available version of Java (Java 1.0) was released in 1995. Sun
Microsystems was acquired by the Oracle Corporation in 2010. Oracle has now the steer Manship
for Java. In 2006 Sun started to make Java available under the GNU General Public License (GPL).
Over time new enhanced versions of Java have been released. The current version of Java is Java
libraries and a runtime (Java virtual machine) The Java runtime allows software developers to
write program code in other languages than the Java programming language which still runs on
the Java virtual machine. The Java platform is usually associated with the Java virtual machine
JVM executes the bytecode produced by compiler. This byte code can run on any platform such
21
as Windows, Linux, Mac OS etc. Which means a program that is compiled on windows can run
on Linux and vice-versa. Each operating system has different JVM, however the output they
produce after execution of bytecode is same across all operating systems. That is why we call java
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
Simple
Java is considered as one of simple language because it does not have complex features like
Robust Language
Robust means reliable. Java programming language is developed in a way that puts a lot of
emphasis on early checking for possible errors, that’s why java compiler is able to detect errors
22
that are not easy to detect in other programming languages. The main features of java that makes
Secure
We don’t have pointers and we cannot access out of bound arrays (you get
ArrayIndexOutOfBoundsException if you try to do so) in java. That’s why several security flaws
Java is distributed
Using java programming language, we can create distributed applications. RMI (Remote Method
Invocation) and EJB (Enterprise Java Beans) are used for creating distributed applications in java.
In simple words: The java programs can be distributed on more than one system that are connected
to each other using internet connection. Objects on one JVM (java virtual machine) can execute
Multithreading
Java supports multithreading. Multithreading is a Java feature that allows concurrent execution of
Portable
As discussed above, java code that is written on one machine can run on another machine. The
platform independent byte code can be carried to any platform for execution that makes java code
portable.
23
3.3.4What is database?
A database is an organized collection of data ,so that it can be easily accessed and managed .There
M any databases available like MySQL ,Sybase ,Oracle ,MongoDB ,Informix ,PostgreSQL ,SQL
Server etc.
SQL or Structured Query Language is used to operate on the data stored in database .SQL depends
Database Structure
MySQL:
MySQL is a free-software database engine originally developed and first released in 1995.MySQL
Is named after My ,the daughter Michael Widenius ,one of the product’s originators .It was
originally
Produced under the GNU General Public License ,in which source code is made freely available
.MySQL is very popular for Web-hosting application because of its plethora of Web-optimized
.MySQL runs back-end databases of some famous website ,including ,Wikipedia ,Google and
24
Facebook a statement to its stability and robustness despite its decentralized ,free-for-all
philosophy.
MySQL Features:
programming language Java, which defines how a client may access a database. It is Java based
data access technology and used for Java database connectivity. It is part of the Java Standard
Edition platform, from Oracle Corporation. It provides methods to query and update data in a
25
CHAPTER 4: RESULT AND DISCUSSION
4.1. Use case diagram
The unified modelling language used is use case diagram. A use case is a set of scenarios that
describes an interaction between a user and a system. A use case diagram displays the relationship
among actors and use cases. The two main components of a use case diagram are use cases and
actors. The actors in our system are students and lecturers. The use case diagram is designed in the
following figure.
26
4.2 System flow chart
A system flowchart is a valuable presentation aid because it shows how my system major
27
4.3. Database design
The database is used for the purpose of handling information as an integrated whole. It is defined
as a collection of interrelated data stored with less or no redundancy to serve many users quickly
and effectively. We should design a database to see how data should be organized around user
requirements. The objective of the database is to make information access, easy quick, inexpensive
and flexible for other users. During database design the following objectives are concerned:
• Controlled Redundancy
• Data independence
• Performance
28
• Table Name :Students
29
4.4 Test tools needed
For this system, there is no special test tool. It is because the system desktop application and we
are testing it by using the scenario-based cases using personal computers such as laptop or desktop.
For example, the tester of this system will put particular data into that system and see whether the
• Select Module
30
• Admin Login (Admin or Lecturer Module):
31
• Add New Question (Admin or Lecturer Module):
32
• Update Questions (Admin or Lecturer Module)
33
• All Questions (Admin or Lecturer Module):
34
• Delete Question (Admin or Lecturer Module):
35
• All Students Result (Admin or Lecturer Module):
36
• Registration (Student Module):
37
• Exam or Quiz (Student Module):
38
4.6. Coding Module
• Login Admin:
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
public loginAdmin() {
initComponents();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
39
jLabel1.setText("Username");
jLabel2.setText("Password");
getContentPane().add(jPasswordField1, new
jCheckBox1.setText("Show Password");
jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
jCheckBox1ActionPerformed(evt);
40
});
getContentPane().add(jCheckBox1, new
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/login.png"))); //
NOI18N
jButton1.setText("Login");
jButton1.addActionListener(new java.awt.event.ActionListener() {
jButton1ActionPerformed(evt);
});
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Back.png"))); //
NOI18N
jButton2.setText("Back");
jButton2.addActionListener(new java.awt.event.ActionListener() {
jButton2ActionPerformed(evt);
41
}
});
jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/login
Background.PNG"))); // NOI18N
jLabel3.setText("jLabel3");
770));
pack();
}// </editor-fold>
setVisible(false);
new index().setVisible(true);
42
{
setVisible(false);
new adminHome().setVisible(true);
else
10px\">Incorrect <br>Username or
Password</b></html>","Show",JOptionPane.INFORMATION_MESSAGE,icon);
if(jCheckBox1.isSelected())
jPasswordField1.setEchoChar((char)0);
else
jPasswordField1.setEchoChar('*');
43
try {
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(loginAdmin.class.getName()).log(java.util.logging.Level.SE
java.util.logging.Logger.getLogger(loginAdmin.class.getName()).log(java.util.logging.Level.SE
java.util.logging.Logger.getLogger(loginAdmin.class.getName()).log(java.util.logging.Level.SE
44
java.util.logging.Logger.getLogger(loginAdmin.class.getName()).log(java.util.logging.Level.SE
java.awt.EventQueue.invokeLater(new Runnable() {
new loginAdmin().setVisible(true);
});
All questions:
45
import java.sql.*;
import Project.ConnectionProvider;
import javax.swing.JOptionPane;
import net.proteanit.sql.DbUtils;
public allQuestion() {
initComponents();
try
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
catch(Exception e)
JOptionPane.showMessageDialog(null, e);
@SuppressWarnings("unchecked")
46
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setAlwaysOnTop(true);
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
// NOI18N
1, -1));
jLabel2.setText("All Question");
47
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(76, 17, -
1, -1));
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); //
NOI18N
jButton1.addActionListener(new java.awt.event.ActionListener() {
jButton1ActionPerformed(evt);
});
-1, -1));
1066, 10));
jTable1.setModel(new javax.swing.table.DefaultTableModel(
},
new String [] {
48
"Title 1", "Title 2", "Title 3", "Title 4"
));
jScrollPane1.setViewportView(jTable1);
admin.jpg"))); // NOI18N
1));
pack();
}// </editor-fold>
adminHome.open=0;
setVisible(false);
try {
49
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(allQuestion.class.getName()).log(java.util.logging.Level.SE
java.util.logging.Logger.getLogger(allQuestion.class.getName()).log(java.util.logging.Level.SE
java.util.logging.Logger.getLogger(allQuestion.class.getName()).log(java.util.logging.Level.SE
java.util.logging.Logger.getLogger(allQuestion.class.getName()).log(java.util.logging.Level.SE
50
}
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
new allQuestion().setVisible(true);
});
try
51
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
if(rs.first())
int id=rs.getInt(1);
id=id+1;
String str=String.valueOf(id);
jLabel4.setText(str);
else
jLabel4.setText("1");
catch(Exception e)
JOptionPane.showMessageDialog(null, e);
String id=jLabel4.getText();
String name=jTextField1.getText();
String opt1=jTextField2.getText();
String opt2=jTextField3.getText();
String opt3=jTextField4.getText();
String opt4=jTextField5.getText();
52
String answer=jTextField6.getText();
try{
Connection con=ConnectionProvider.getCon();
ps.setString(1,id);
ps.setString(2,name);
ps.setString(3,opt1);
ps.setString(4,opt2);
ps.setString(5,opt3);
ps.setString(6,opt4);
ps.setString(7,answer);
ps.executeUpdate();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"Successfully Updated");
setVisible(false);
new addNewQuestion().setVisible(true);
catch(Exception e)
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,e); }
Update Question:
53
import java.sql.*;
import Project.ConnectionProvider;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
@SuppressWarnings("unchecked")
54
jTextField2 = new javax.swing.JTextField();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setAlwaysOnTop(true);
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Update
Question.png"))); // NOI18N
1, -1));
jLabel2.setText("Update Question");
55
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(76, 11, -
1, -1));
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); //
NOI18N
jButton1.addActionListener(new java.awt.event.ActionListener() {
jButton1ActionPerformed(evt);
});
-1, -1));
1066, 10));
jLabel3.setText("Question ID:");
-1, -1));
jLabel4.setText("Question:");
56
getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 170,
-1, -1));
jLabel5.setText("Option 1:");
-1, -1));
jLabel6.setText("Option 2:");
-1, -1));
jLabel7.setText("Option 3:");
-1, -1));
jLabel8.setText("Option 4:");
-1, -1));
57
jLabel9.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N
jLabel9.setText("Answer:");
-1, -1));
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/search.png"))); //
NOI18N
jButton2.setText("Search");
jButton2.addActionListener(new java.awt.event.ActionListener() {
jButton2ActionPerformed(evt);
});
58
getContentPane().add(jTextField2, new org.netbeans.lib.awtextra.AbsoluteConstraints(300,
59
jButton3.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N
jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/save.png"))); //
NOI18N
jButton3.setText("Update");
jButton3.addActionListener(new java.awt.event.ActionListener() {
jButton3ActionPerformed(evt);
});
jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clear.png"))); //
NOI18N
jButton4.setText("Clear");
jButton4.addActionListener(new java.awt.event.ActionListener() {
jButton4ActionPerformed(evt);
});
60
jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background
admin.jpg"))); // NOI18N
-1));
pack();
}// </editor-fold>
adminHome.open=0;
setVisible(false);
String id=jTextField1.getText();
try
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
61
if(rs.first())
jTextField2.setText(rs.getString(2));
jTextField3.setText(rs.getString(3));
jTextField4.setText(rs.getString(4));
jTextField5.setText(rs.getString(5));
jTextField6.setText(rs.getString(6));
jTextField7.setText(rs.getString(7));
jTextField1.setEditable(false);
else
jf.setAlwaysOnTop(true);
catch(Exception e)
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,e);
62
}
String id=jTextField1.getText();
String name=jTextField2.getText();
String opt1=jTextField3.getText();
String opt2=jTextField4.getText();
String opt3=jTextField5.getText();
String opt4=jTextField6.getText();
String answer=jTextField7.getText();
try
Connection con=ConnectionProvider.getCon();
ps.setString(1,name);
ps.setString(2,opt1);
ps.setString(3,opt2);
ps.setString(4,opt3);
ps.setString(5,opt4);
ps.setString(6,answer);
63
ps.setString(7,id);
ps.executeUpdate();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"Successfully Updated");
setVisible(false);
new updateQuestion().setVisible(true);
catch(Exception e)
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,e);
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
64
jTextField6.setText("");
jTextField7.setText("");
jTextField1.setEditable(true);
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
try {
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(updateQuestion.class.getName()).log(java.util.logging.Level.
java.util.logging.Logger.getLogger(updateQuestion.class.getName()).log(java.util.logging.Level.
65
java.util.logging.Logger.getLogger(updateQuestion.class.getName()).log(java.util.logging.Level.
java.util.logging.Logger.getLogger(updateQuestion.class.getName()).log(java.util.logging.Level.
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
new updateQuestion().setVisible(true);
});
66
private javax.swing.JLabel jLabel1;
• Delete Question:
import java.sql.*;
import Project.ConnectionProvider;
67
import javax.swing.JFrame;
import javax.swing.JOptionPane;
@SuppressWarnings("unchecked")
68
jTextField6 = new javax.swing.JTextField();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setAlwaysOnTop(true);
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/delete
Question.png"))); // NOI18N
1, -1));
jLabel2.setText("Delete Question");
1, -1));
69
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); //
NOI18N
jButton1.addActionListener(new java.awt.event.ActionListener() {
jButton1ActionPerformed(evt);
});
-1, -1));
1066, 10));
jLabel3.setText("Question ID:");
-1, -1));
jLabel4.setText("Question:");
-1, -1));
70
jLabel5.setText("Option 1:");
-1, -1));
jLabel6.setText("Option 2:");
-1, -1));
jLabel7.setText("Option 3:");
-1, -1));
jLabel8.setText("Option 4:");
-1, -1));
jLabel9.setText("Answer:");
-1, -1));
71
jTextField1.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N
72
getContentPane().add(jTextField6, new org.netbeans.lib.awtextra.AbsoluteConstraints(287,
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/search.png"))); //
NOI18N
jButton2.setText("Search");
jButton2.addActionListener(new java.awt.event.ActionListener() {
jButton2ActionPerformed(evt);
});
jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/delete.png"))); //
NOI18N
jButton3.setText("Delete");
73
jButton3.addActionListener(new java.awt.event.ActionListener() {
jButton3ActionPerformed(evt);
});
jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clear.png"))); //
NOI18N
jButton4.setText("Clear");
jButton4.addActionListener(new java.awt.event.ActionListener() {
jButton4ActionPerformed(evt);
});
admin.jpg"))); // NOI18N
74
getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1,
-1));
pack();
}// </editor-fold>
adminHome.open=0;
setVisible(false);
String id=jTextField1.getText();
try
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
if(rs.first())
jTextField2.setText(rs.getString(2));
jTextField3.setText(rs.getString(3));
75
jTextField4.setText(rs.getString(4));
jTextField5.setText(rs.getString(5));
jTextField6.setText(rs.getString(6));
jTextField7.setText(rs.getString(7));
jTextField1.setEditable(false);
else
jf.setAlwaysOnTop(true);
catch(Exception e)
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,e);
76
// TODO add your handling code here:
String id=jTextField1.getText();
try
Connection con=ConnectionProvider.getCon();
ps.setString(1, id);
ps.executeUpdate();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"Successfully Deleted");
setVisible(false);
new deleteQuestion().setVisible(true);
catch(Exception e)
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,e);
77
// TODO add your handling code here:
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextField7.setText("");
jTextField1.setEditable(true);
try {
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(deleteQuestion.class.getName()).log(java.util.logging.Level.
78
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(deleteQuestion.class.getName()).log(java.util.logging.Level.
java.util.logging.Logger.getLogger(deleteQuestion.class.getName()).log(java.util.logging.Level.
java.util.logging.Logger.getLogger(deleteQuestion.class.getName()).log(java.util.logging.Level.
java.awt.EventQueue.invokeLater(new Runnable() {
new deleteQuestion().setVisible(true);
});
79
private javax.swing.JButton jButton4;
try
80
{
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
jTable1.setAutoResizeMode(jTable1.AUTO_RESIZE_OFF);
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
catch(Exception e)
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,e);
• Registration:
String rollNo=jTextField1.getText();
String name=jTextField2.getText();
String fatherName=jTextField3.getText();
String motherName=jTextField4.getText();
String gender=(String)jComboBox1.getSelectedItem();
String contactNo=jTextField5.getText();
String email=jTextField6.getText();
String tenthUniversityName=jTextField7.getText();
String tenthPercentage=jTextField8.getText();
81
String tenthPassoutYear=jTextField9.getText();
String twelveUniversityName=jTextField10.getText();
String twelvePercentage=jTextField11.getText();
String twelvePassoutYear=jTextField12.getText();
String graduationUniversityName=jTextField13.getText();
String graduationPercentage=jTextField14.getText();
String graduationPassoutYear=jTextField15.getText();
String address=jTextField16.getText();
String marks="0";
try
Connection con=ConnectionProvider.getCon();
values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1,rollNo);
ps.setString(2,name);
ps.setString(3,fatherName);
ps.setString(4,motherName);
ps.setString(5,gender);
ps.setString(6,contactNo);
ps.setString(7,email);
ps.setString(8,tenthUniversityName);
82
ps.setString(9,tenthPercentage);
ps.setString(10,tenthPassoutYear);
ps.setString(11,twelveUniversityName);
ps.setString(12,twelvePercentage);
ps.setString(13,twelvePassoutYear);
ps.setString(14,graduationUniversityName);
ps.setString(15,graduationPercentage);
ps.setString(16,graduationPassoutYear);
ps.setString(17,address);
ps.setString(18,marks);
ps.executeUpdate();
setVisible(false);
new instructionStudent(rollNo).setVisible(true);
catch(Exception e) {
JOptionPane.showMessageDialog(null, e); }
• Quiz or Exam:
83
public void answerCheck()
String studentAnswer="";
if(jRadioButton1.isSelected())
studentAnswer=jRadioButton1.getText();
else if(jRadioButton2.isSelected())
studentAnswer=jRadioButton2.getText();
else if(jRadioButton3.isSelected())
studentAnswer=jRadioButton3.getText();
else
studentAnswer=jRadioButton4.getText();
if(studentAnswer.equals(answer))
marks=marks+1;
String marks1=String.valueOf(marks);
84
jLabel19.setText(marks1);
int questionId1=Integer.parseInt(questionId);
questionId1=questionId1+1;
questionId=String.valueOf(questionId1);
//clear jRadioButton
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
jRadioButton3.setSelected(false);
jRadioButton4.setSelected(false);
if(questionId.equals("10"))
jButton1.setVisible(false);
try
85
{
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
while(rs1.next())
jLabel17.setText(rs1.getString(1));
jLabel20.setText(rs1.getString(2));
jRadioButton1.setText(rs1.getString(3));
jRadioButton2.setText(rs1.getString(4));
jRadioButton3.setText(rs1.getString(5));
jRadioButton4.setText(rs1.getString(6));
answer=rs1.getString(7);
catch(Exception e)
JOptionPane.showMessageDialog(null, e);
String rollNo=jLabel11.getText();
86
answerCheck();
try
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
String marks1=String.valueOf(marks);
setVisible(false);
new successfullySubmited(marks1).setVisible(true);
catch(Exception e)
JOptionPane.showMessageDialog(null, e);
Timer time;
initComponents();
jLabel11.setText(rollNo);
//date
jLabel4.setText(dFormat.format(date));
87
//first question and student Details
try
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
while(rs.next())
jLabel13.setText(rs.getString(2));
while(rs1.next())
jLabel17.setText(rs1.getString(1));
jLabel20.setText(rs1.getString(2));
jRadioButton1.setText(rs1.getString(3));
jRadioButton2.setText(rs1.getString(4));
jRadioButton3.setText(rs1.getString(5));
jRadioButton4.setText(rs1.getString(6));
answer=rs1.getString(7);
88
catch(Exception e)
JOptionPane.showMessageDialog(null, e);
//time program
setLocationRelativeTo(this);
@Override
jLabel9.setText(String.valueOf(sec));
jLabel8.setText(String.valueOf(min))
if(sec==60)
sec=0;
min++;
if(min==10)
time.stop();
answerCheck();
submit();
89
}
sec++;
});
time.start();
90
CHAPTER 5: CONCLUSION & RECOMMANDATION
5.1. CONCLUSION
With the completion of this project I conclude that it has achieved its purpose. The whole project
provides a base for students to take their exam using software and allow lecturers to add questions
and answers into the system. The system is developed using Java programming language and data
Quiz or Exam Management system for introduction to management course is the best compared
to paper-based exam. The automated system helps students and lecturers to save time and makes
the process faster. It saves space since answers papers will not be used. With a user friendly system
that has security, integrity and the database is neither inconsistent nor redundant.
5.2 Recommendations:
The project has been accomplished and an application was developed to solve the aforementioned
problems. For further development, there are some recommendations on this project: The
application should support an automated time setting to let the student know how many hours and
91
CHAPTER 6:
REFERENCES
[2] Enright, A.G., and Libert, T., "The Web: It's not just for E-mail Anymore", American Society
for Engineering Education (ASEE) Annual Conference Proceedings, Charlotte, North Carolina,
1999.
[4] Ritchey, Tim, and Shobe, Matt, "JavaScript For Macintosh", 1996
[6] Biedny, David, and Monroy, Bert, "Adobe Photoshop Handbook", 2.5 Edition, 1993
92