0% found this document useful (0 votes)
52 views92 pages

Quiz and Exam Management System

The document presents a project titled 'Quiz & Exam Management System', developed by Madhusmita Samal and her team for the N.C Autonomous College, Jajpur, aimed at automating the examination process for students and lecturers. It outlines the system's functionality, which includes student registration, exam administration, and result generation, addressing the inefficiencies of manual examination methods. The project is structured into multiple chapters covering introduction, literature survey, methodology, results, and recommendations, emphasizing the relevance and feasibility of the system in modern education.

Uploaded by

sahoopubg5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views92 pages

Quiz and Exam Management System

The document presents a project titled 'Quiz & Exam Management System', developed by Madhusmita Samal and her team for the N.C Autonomous College, Jajpur, aimed at automating the examination process for students and lecturers. It outlines the system's functionality, which includes student registration, exam administration, and result generation, addressing the inefficiencies of manual examination methods. The project is structured into multiple chapters covering introduction, literature survey, methodology, results, and recommendations, emphasizing the relevance and feasibility of the system in modern education.

Uploaded by

sahoopubg5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 92

ON

“QUIZ & EXAM MANAGEMENT SYSTEM”

Submitted to
DEPARTMENT OF BACHELOR OF COMPUTER APPLICATION
N.C AUTONOMOUS COLLEGE,JAJPUR

Session:2023-24

Presented By: Dissertation Guide:


MADHUSMITA SAMAL Mr. SADIQ KHAN
Class Roll No:BCA-SF-21-020 Faculty in Self Financing Department
Exam Roll No:1621BC041 N.C(AUTO) College, Jajpur
N.C(AUTO) College, Jajpur
I here declare that the project work entitled “QUIZ & EXAM MANAGEMENT SYSTEM”

Submitted to Department of Self-financing(N.C Autonomous College ,Jajpur),Is prepared by me

and my team .All the project complete is for my team’s effort.

Date : MADHUSMITA SAMAL

Place :N.C(AUTO) College ,Jajpur Class Roll No:BCA-SF-21-020

Exam Roll No:1621BC041

2
This is certify that the project entitled “QUIZ & EXAM MANAGEMENT SYSTEM”

submitted by MADHUSMITA SAMAL ,Roll no:BCA-SF-21-020 in partial fulfilment of the

requirement BCA 6TH semester project in record of bonfire work carried out by them under my

supervision and guidance.

During this period of project work have sincerely and fully dedicated to their project .Their

character and conduct is good to best of knowledge.

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.

First of all express my deep sence of gratitude to my supervisors & guide

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

language and database.

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,

insertion of data in the database, extraction of data from the database.

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

Project Name: “QUIZ & EXAM MANAGEMENT SYSTEM”

Participants

S .No Name Phone No E-mail Address

01 Madhusmita Samal 9692602942 [email protected]

02 Shiv Sundar Samal 7846834720 [email protected]

03 Subham Samal 7815064817 [email protected]

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 2: LITERATURE SURVEY


2.1: INTRODUCTION
2.2: COMPUTERIZED SYSTEMS

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 5: CONCLUSION & RECOMMANDATION


5.1: CONCLUSION
5.2: RECOMMANDATION

CHAPTER 6: REFERENCES

8
LIST OF FIGURES

S.no Figur Title of Figures


e
No.
1 3.1 WATERFALL MODEL

2 4.1 USE CASE DIAGRAM

3 4.2 SYSTEM FLOW CHART

4 4.3 QUESTIONS TABLE

5 4.4 STUDENTS TABLE

6 4.5 SELECT MODULE

7 4.6 ADMIN LOGIN

8 4.7 ADD NEW QUESTION

9 4.8 UPDATE QUESTIONS

10 4.9 ALL QUESTIONS

11 4.10 DELETE QUESTION

12 4.11 ALL STUDENTS RESULT

13 4.12 REGISTRATION

14 4.13 EXAM OR QUIZ 2

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

fundamental change to the education. Information technology makes the exchanges of

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

fail or pass the exam.

Quiz or Exam management system is a technology-driven way to simplify examination activities

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-

based exams to paperless mode.

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

tests and personality tests, entrance exams, hiring assessment tests.

1.2. Problem statement

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

and those who fail the exam.

1.4. Project relevancy, feasibility

1.4.1. Technical Feasibility


Building this system is technically feasible. The hardware and software needed are all available,

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

just needs to read the manual or tutorial from the developers.

1.4.3. Economic Feasibility

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

to do distance learning, method of learning at a distance instead of learning in a classroom.

Communications technologies create possibilities, both individual and institutional, for an

unprecedented expansion of home based learning, much of it part-time. Information technology

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

time and money when using computer system in their studies.

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

data, and there is control of redundancy, integrity, security, flexibility, responsiveness,

improvement of maintenance and data independence.

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.

3.2 Project Activities


In order to give solution to problems in an industry, software developer or a team of developers

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:

Figure 3.1: Waterfall Model

3.2.1 Requirement Gathering stage


During this phase, detailed requirements of the software system to be developed are gathered from

client.

18
3.2.2 Design Stage
Plan the programming language, for Example Java, PHP, .net or database like Oracle, MySQL,

etc. Or other high-level technical details of the project

3.2.3 Built Stage


After design stage, it is built stage, that is nothing but coding the software.

3.2.4 Test Stage


In this phase, you test the software to verify that it is built as per the specifications given by the

client.

3.2.5 Deployment stage


Deploy the application in the respective environment

3.2.6 Maintenance stage


Once your system is ready to use, you may later require change the code as per customer request.

3.3 Tools & Technology used


Project Name :QUIZ & EXAM MANAGEMENT SYSTEM

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

software using Java programming language.

3.3.2 MySQL 8.0 Command Line Client


MySQL is an open source RDBMS that relies on SQL for processing the data in the database.

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

by the terms of the GPL.

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

Oracle continues this project called OpenJDK.

Over time new enhanced versions of Java have been released. The current version of Java is Java

1.8 which is also known as Java 8.

Java is defined by a specification and consists of a programming language, a compiler, core

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

and the Java core libraries.

MAIN FEATURES OF JAVA:

Java is a platform independent language


Compiler(java) converts source code (.java file) to the byte code (.class file). As mentioned above,

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

as platform independent language.

Java is an Object-Oriented language

Object oriented programming is a way of organizing programs as collection of objects, each of

which represents an instance of a class.

4 main concepts of Object-Oriented programming are:

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

Operator overloading, Multiple inheritance, pointers and Explicit memory allocation.

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

it robust are garbage collection, Exception Handling and memory allocation.

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

like stack corruption or buffer overflow is impossible to exploit in Java.

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

procedures on a remote JVM.

Multithreading
Java supports multithreading. Multithreading is a Java feature that allows concurrent execution of

two or more parts of a program for maximum utilization of CP.

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.

I am project MySQL is used as database

SQL or Structured Query Language is used to operate on the data stored in database .SQL depends

On relational algebra and tuple relational calculus.

A cylindrical structure is used to display the image of database:

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:

MySQL is a database management system.

MySQL is a relational database management system.

3.3.5 INTRODUCTION TO JDBC:


Java Database Connectivity (JDBC) is an application programming interface (API) for the

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

database, and is oriented towards relational databases.

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.

Figure 4.1: Use case diagram

26
4.2 System flow chart
A system flowchart is a valuable presentation aid because it shows how my system major

components fit together and interact. In effect, it serves as a system roadmap.

Figure 4.2: System Flow Chart

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

• Accurate and integrating

• More information at low cost

• Recovery from failure

• Privacy and security

• Performance

The tables used in the database are as follow:

• Table Name: questions

Figure 4.3: questions table

28
• Table Name :Students

Figure 4.4: Students table

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

expected output will come out or not.

4.5. Interface Design


This section contains some screenshots of the components of the system.

• Select Module

Figure 4.5: Select Module

30
• Admin Login (Admin or Lecturer Module):

Figure 4.6: Admin Login (Admin or Lecturer Module)

31
• Add New Question (Admin or Lecturer Module):

Figure 4.7: Add New Question (Admin or Lecturer Module)

32
• Update Questions (Admin or Lecturer Module)

Figure 4.8: Update Questions (Admin or Lecturer Module)

33
• All Questions (Admin or Lecturer Module):

Figure 4.9: All Questions (Admin or Lecturer Module):

34
• Delete Question (Admin or Lecturer Module):

Figure 4.10: Delete Question (Admin or Lecturer Module)

35
• All Students Result (Admin or Lecturer Module):

Figure 4.11: All Students Result (Admin or Lecturer Module)

36
• Registration (Student Module):

Figure 4.12: Registration (Student Module)

37
• Exam or Quiz (Student Module):

Figure 4.13: Exam or Quiz (Student Module)

38
4.6. Coding Module

• Login Admin:

import javax.swing.ImageIcon;

import javax.swing.JOptionPane;

public class loginAdmin extends javax.swing.JFrame {

public loginAdmin() {

initComponents();

private void initComponents() {

jLabel1 = new javax.swing.JLabel();

jTextField1 = new javax.swing.JTextField();

jLabel2 = new javax.swing.JLabel();

jPasswordField1 = new javax.swing.JPasswordField();

jCheckBox1 = new javax.swing.JCheckBox();

jButton1 = new javax.swing.JButton();

jButton2 = new javax.swing.JButton();

jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

setUndecorated(true);

getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14));

39
jLabel1.setText("Username");

getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1070,

200, -1, -1));

jTextField1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

getContentPane().add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(980,

240, 259, -1));

jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

jLabel2.setText("Password");

getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1070,

290, -1, -1));

jPasswordField1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

getContentPane().add(jPasswordField1, new

org.netbeans.lib.awtextra.AbsoluteConstraints(980, 330, 259, -1));

jCheckBox1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

jCheckBox1.setText("Show Password");

jCheckBox1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jCheckBox1ActionPerformed(evt);

40
});

getContentPane().add(jCheckBox1, new

org.netbeans.lib.awtextra.AbsoluteConstraints(1050, 370, -1, -1));

jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/login.png"))); //

NOI18N

jButton1.setText("Login");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(980,

400, -1, -1));

jButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Back.png"))); //

NOI18N

jButton2.setText("Back");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

41
}

});

getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1150,

400, -1, -1));

jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/login

Background.PNG"))); // NOI18N

jLabel3.setText("jLabel3");

getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -2, -1,

770));

pack();

}// </editor-fold>

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

setVisible(false);

new index().setVisible(true);

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(jTextField1.getText().equals("qems") && jPasswordField1.getText().equals("admin"))

42
{

setVisible(false);

new adminHome().setVisible(true);

else

ImageIcon icon=new ImageIcon("Incorrect Password.PNG");

JOptionPane.showMessageDialog(null,"<html><b style=\"color: red; font-size:

10px\">Incorrect <br>Username or

Password</b></html>","Show",JOptionPane.INFORMATION_MESSAGE,icon);

private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(jCheckBox1.isSelected())

jPasswordField1.setEchoChar((char)0);

else

jPasswordField1.setEchoChar('*');

public static void main(String args[]) {

43
try {

for (javax.swing.UIManager.LookAndFeelInfo info :

javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(loginAdmin.class.getName()).log(java.util.logging.Level.SE

VERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(loginAdmin.class.getName()).log(java.util.logging.Level.SE

VERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(loginAdmin.class.getName()).log(java.util.logging.Level.SE

VERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

44
java.util.logging.Logger.getLogger(loginAdmin.class.getName()).log(java.util.logging.Level.SE

VERE, null, ex);

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new loginAdmin().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JCheckBox jCheckBox1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JPasswordField jPasswordField1;

private javax.swing.JTextField jTextField1;

// End of variables declaration

All questions:

45
import java.sql.*;

import Project.ConnectionProvider;

import javax.swing.JOptionPane;

import net.proteanit.sql.DbUtils;

public class allQuestion extends javax.swing.JFrame {

public allQuestion() {

initComponents();

try

Connection con=ConnectionProvider.getCon();

Statement st=con.createStatement();

ResultSet rs=st.executeQuery("select *from question");

jTable1.setModel(DbUtils.resultSetToTableModel(rs));

catch(Exception e)

JOptionPane.showMessageDialog(null, e);

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">

46
private void initComponents() {

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

jSeparator1 = new javax.swing.JSeparator();

jScrollPane1 = new javax.swing.JScrollPane();

jTable1 = new javax.swing.JTable();

jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

setAlwaysOnTop(true);

setLocation(new java.awt.Point(150, 183));

setUndecorated(true);

getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/all questions.png")));

// NOI18N

getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, -

1, -1));

jLabel2.setFont(new java.awt.Font("Algerian", 1, 40)); // NOI18N

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() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(963, 17,

-1, -1));

getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 92,

1066, 10));

jTable1.setModel(new javax.swing.table.DefaultTableModel(

new Object [][] {

{null, null, null, null},

{null, null, null, null},

{null, null, null, null},

{null, null, null, null}

},

new String [] {

48
"Title 1", "Title 2", "Title 3", "Title 4"

));

jScrollPane1.setViewportView(jTable1);

getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10,

108, 1046, 416));

jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background

admin.jpg"))); // NOI18N

getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -

1));

pack();

}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

adminHome.open=0;

setVisible(false);

public static void main(String args[]) {

try {

49
for (javax.swing.UIManager.LookAndFeelInfo info :

javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(allQuestion.class.getName()).log(java.util.logging.Level.SE

VERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(allQuestion.class.getName()).log(java.util.logging.Level.SE

VERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(allQuestion.class.getName()).log(java.util.logging.Level.SE

VERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(allQuestion.class.getName()).log(java.util.logging.Level.SE

VERE, null, ex);

50
}

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new allQuestion().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton jButton1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JSeparator jSeparator1;

private javax.swing.JTable jTable1;

// End of variables declaration

Add New Questions :

try

51
Connection con=ConnectionProvider.getCon();

Statement st=con.createStatement();

ResultSet rs=st.executeQuery("select count(id) from question");

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();

PreparedStatement ps=con.prepareStatement("insert into question values(?,?,?,?,?,?,?)");

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();

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,"Successfully Updated");

setVisible(false);

new addNewQuestion().setVisible(true);

catch(Exception e)

{ JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,e); }

Update Question:

53
import java.sql.*;

import Project.ConnectionProvider;

import javax.swing.JFrame;

import javax.swing.JOptionPane;

public class updateQuestion extends javax.swing.JFrame {

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">

private void initComponents() {

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

jSeparator1 = new javax.swing.JSeparator();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

jLabel9 = new javax.swing.JLabel();

jTextField1 = new javax.swing.JTextField();

jButton2 = new javax.swing.JButton();

54
jTextField2 = new javax.swing.JTextField();

jTextField3 = new javax.swing.JTextField();

jTextField4 = new javax.swing.JTextField();

jTextField5 = new javax.swing.JTextField();

jTextField6 = new javax.swing.JTextField();

jTextField7 = new javax.swing.JTextField();

jButton3 = new javax.swing.JButton();

jButton4 = new javax.swing.JButton();

jLabel10 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

setAlwaysOnTop(true);

setLocation(new java.awt.Point(150, 183));

setUndecorated(true);

getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Update

Question.png"))); // NOI18N

getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, -

1, -1));

jLabel2.setFont(new java.awt.Font("Algerian", 1, 40)); // NOI18N

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() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(963, 11,

-1, -1));

getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 86,

1066, 10));

jLabel3.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel3.setText("Question ID:");

getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 130,

-1, -1));

jLabel4.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel4.setText("Question:");

56
getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 170,

-1, -1));

jLabel5.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel5.setText("Option 1:");

getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 210,

-1, -1));

jLabel6.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel6.setText("Option 2:");

getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 250,

-1, -1));

jLabel7.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel7.setText("Option 3:");

getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 290,

-1, -1));

jLabel8.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel8.setText("Option 4:");

getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 330,

-1, -1));

57
jLabel9.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel9.setText("Answer:");

getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 370,

-1, -1));

jTextField1.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(300,

120, 200, -1));

jButton2.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/search.png"))); //

NOI18N

jButton2.setText("Search");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(510,

120, -1, -1));

jTextField2.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

58
getContentPane().add(jTextField2, new org.netbeans.lib.awtextra.AbsoluteConstraints(300,

170, 691, -1));

jTextField3.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField3, new org.netbeans.lib.awtextra.AbsoluteConstraints(300,

210, 691, -1));

jTextField4.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField4, new org.netbeans.lib.awtextra.AbsoluteConstraints(300,

250, 691, -1));

jTextField5.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField5, new org.netbeans.lib.awtextra.AbsoluteConstraints(300,

290, 691, -1));

jTextField6.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField6, new org.netbeans.lib.awtextra.AbsoluteConstraints(300,

330, 691, -1));

jTextField7.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField7, new org.netbeans.lib.awtextra.AbsoluteConstraints(300,

370, 691, -1));

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() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton3ActionPerformed(evt);

});

getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(298,

430, -1, -1));

jButton4.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clear.png"))); //

NOI18N

jButton4.setText("Clear");

jButton4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton4ActionPerformed(evt);

});

getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(523,

430, -1, -1));

60
jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background

admin.jpg"))); // NOI18N

getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1,

-1));

pack();

}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

adminHome.open=0;

setVisible(false);

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

String id=jTextField1.getText();

try

Connection con=ConnectionProvider.getCon();

Statement st=con.createStatement();

ResultSet rs=st.executeQuery("select *from question where id='"+id+"'");

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

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,"Question Id does not Exist!");

catch(Exception e)

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,e);

62
}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

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();

PreparedStatement ps=con.prepareStatement("update question set

name=?,opt1=?,opt2=?,opt3=?,opt4=?,answer=? where id=?");

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();

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,"Successfully Updated");

setVisible(false);

new updateQuestion().setVisible(true);

catch(Exception e)

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,e);

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

jTextField1.setText("");

jTextField2.setText("");

jTextField3.setText("");

jTextField4.setText("");

jTextField5.setText("");

64
jTextField6.setText("");

jTextField7.setText("");

jTextField1.setEditable(true);

public static void main(String args[]) {

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

try {

for (javax.swing.UIManager.LookAndFeelInfo info :

javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(updateQuestion.class.getName()).log(java.util.logging.Level.

SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(updateQuestion.class.getName()).log(java.util.logging.Level.

SEVERE, null, ex);

} catch (IllegalAccessException ex) {

65
java.util.logging.Logger.getLogger(updateQuestion.class.getName()).log(java.util.logging.Level.

SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(updateQuestion.class.getName()).log(java.util.logging.Level.

SEVERE, null, ex);

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new updateQuestion().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JButton jButton4;

66
private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel10;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JSeparator jSeparator1;

private javax.swing.JTextField jTextField1;

private javax.swing.JTextField jTextField2;

private javax.swing.JTextField jTextField3;

private javax.swing.JTextField jTextField4;

private javax.swing.JTextField jTextField5;

private javax.swing.JTextField jTextField6;

private javax.swing.JTextField jTextField7;

// End of variables declaration

• Delete Question:

import java.sql.*;

import Project.ConnectionProvider;

67
import javax.swing.JFrame;

import javax.swing.JOptionPane;

public class deleteQuestion extends javax.swing.JFrame {

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">

private void initComponents() {

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

jSeparator1 = new javax.swing.JSeparator();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

jLabel9 = new javax.swing.JLabel();

jTextField1 = new javax.swing.JTextField();

jTextField2 = new javax.swing.JTextField();

jTextField3 = new javax.swing.JTextField();

jTextField4 = new javax.swing.JTextField();

jTextField5 = new javax.swing.JTextField();

68
jTextField6 = new javax.swing.JTextField();

jTextField7 = new javax.swing.JTextField();

jButton2 = new javax.swing.JButton();

jButton3 = new javax.swing.JButton();

jButton4 = new javax.swing.JButton();

jLabel10 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

setAlwaysOnTop(true);

setLocation(new java.awt.Point(150, 183));

setUndecorated(true);

getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/delete

Question.png"))); // NOI18N

getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, -

1, -1));

jLabel2.setFont(new java.awt.Font("Algerian", 1, 40)); // NOI18N

jLabel2.setText("Delete Question");

getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(76, 11, -

1, -1));

69
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); //

NOI18N

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(963, 11,

-1, -1));

getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 91,

1066, 10));

jLabel3.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel3.setText("Question ID:");

getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(105, 142,

-1, -1));

jLabel4.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel4.setText("Question:");

getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(105, 185,

-1, -1));

jLabel5.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

70
jLabel5.setText("Option 1:");

getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(105, 227,

-1, -1));

jLabel6.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel6.setText("Option 2:");

getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(105, 269,

-1, -1));

jLabel7.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel7.setText("Option 3:");

getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(105, 311,

-1, -1));

jLabel8.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel8.setText("Option 4:");

getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(105, 353,

-1, -1));

jLabel9.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jLabel9.setText("Answer:");

getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(105, 395,

-1, -1));

71
jTextField1.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(287,

139, 190, -1));

jTextField2.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField2, new org.netbeans.lib.awtextra.AbsoluteConstraints(287,

182, 700, -1));

jTextField3.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField3, new org.netbeans.lib.awtextra.AbsoluteConstraints(287,

224, 700, -1));

jTextField4.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField4, new org.netbeans.lib.awtextra.AbsoluteConstraints(287,

266, 700, -1));

jTextField5.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField5, new org.netbeans.lib.awtextra.AbsoluteConstraints(287,

308, 700, -1));

jTextField6.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

72
getContentPane().add(jTextField6, new org.netbeans.lib.awtextra.AbsoluteConstraints(287,

350, 700, -1));

jTextField7.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

getContentPane().add(jTextField7, new org.netbeans.lib.awtextra.AbsoluteConstraints(287,

392, 700, -1));

jButton2.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/search.png"))); //

NOI18N

jButton2.setText("Search");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(495,

138, -1, -1));

jButton3.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/delete.png"))); //

NOI18N

jButton3.setText("Delete");

73
jButton3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton3ActionPerformed(evt);

});

getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(287,

457, -1, -1));

jButton4.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N

jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clear.png"))); //

NOI18N

jButton4.setText("Clear");

jButton4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton4ActionPerformed(evt);

});

getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(540,

457, -1, -1));

jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background

admin.jpg"))); // NOI18N

74
getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1,

-1));

pack();

}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

adminHome.open=0;

setVisible(false);

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

String id=jTextField1.getText();

try

Connection con=ConnectionProvider.getCon();

Statement st=con.createStatement();

ResultSet rs=st.executeQuery("select *from question where id='"+id+"'");

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

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,"Question Id does not Exist");

catch(Exception e)

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,e);

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

76
// TODO add your handling code here:

String id=jTextField1.getText();

try

Connection con=ConnectionProvider.getCon();

PreparedStatement ps=con.prepareStatement("delete from question where id=?");

ps.setString(1, id);

ps.executeUpdate();

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,"Successfully Deleted");

setVisible(false);

new deleteQuestion().setVisible(true);

catch(Exception e)

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf,e);

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {

77
// TODO add your handling code here:

jTextField1.setText("");

jTextField2.setText("");

jTextField3.setText("");

jTextField4.setText("");

jTextField5.setText("");

jTextField6.setText("");

jTextField7.setText("");

jTextField1.setEditable(true);

public static void main(String args[]) {

try {

for (javax.swing.UIManager.LookAndFeelInfo info :

javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(deleteQuestion.class.getName()).log(java.util.logging.Level.

SEVERE, null, ex);

78
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(deleteQuestion.class.getName()).log(java.util.logging.Level.

SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(deleteQuestion.class.getName()).log(java.util.logging.Level.

SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(deleteQuestion.class.getName()).log(java.util.logging.Level.

SEVERE, null, ex);

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new deleteQuestion().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

79
private javax.swing.JButton jButton4;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel10;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JSeparator jSeparator1;

private javax.swing.JTextField jTextField1;

private javax.swing.JTextField jTextField2;

private javax.swing.JTextField jTextField3;

private javax.swing.JTextField jTextField4;

private javax.swing.JTextField jTextField5;

private javax.swing.JTextField jTextField6;

private javax.swing.JTextField jTextField7;

// End of variables declaration

• All Student Result:

try

80
{

Connection con=ConnectionProvider.getCon();

Statement st=con.createStatement();

ResultSet rs=st.executeQuery("select *from student where marks >="+marks+"");

jTable1.setAutoResizeMode(jTable1.AUTO_RESIZE_OFF);

jTable1.setModel(DbUtils.resultSetToTableModel(rs));

catch(Exception e)

JFrame jf=new JFrame();

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();

PreparedStatement ps=con.prepareStatement("insert into student

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:

public String questionId="1";

public String answer;

public int min=0;

public int sec=0;

public int marks=0;

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

//question number change

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

//last question hide next button

if(questionId.equals("10"))

jButton1.setVisible(false);

public void question()

try

85
{

Connection con=ConnectionProvider.getCon();

Statement st=con.createStatement();

ResultSet rs1=st.executeQuery("select *from question where id='"+questionId+"'");

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

public void submit()

String rollNo=jLabel11.getText();

86
answerCheck();

try

Connection con=ConnectionProvider.getCon();

Statement st=con.createStatement();

st.executeUpdate("update student set marks='"+marks+"' where rollNo='"+rollNo+"' ");

String marks1=String.valueOf(marks);

setVisible(false);

new successfullySubmited(marks1).setVisible(true);

catch(Exception e)

JOptionPane.showMessageDialog(null, e);

Timer time;

public quizExamStudent(String rollNo) {

initComponents();

jLabel11.setText(rollNo);

//date

SimpleDateFormat dFormat=new SimpleDateFormat("dd-MM-yyyy");

Date date=new Date();

jLabel4.setText(dFormat.format(date));

87
//first question and student Details

try

Connection con=ConnectionProvider.getCon();

Statement st=con.createStatement();

ResultSet rs=st.executeQuery("select *from student where rollNo='"+rollNo+"'");

while(rs.next())

jLabel13.setText(rs.getString(2));

ResultSet rs1=st.executeQuery("select *from question where id='"+questionId+"'");

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

time=new Timer(1000,new ActionListener() {

@Override

public void actionPerformed(ActionEvent e) {

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

are saved in the database.

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

minutes are left for them to complete the examination.

91
CHAPTER 6:
REFERENCES

[1] Nijaz.(2000). Dynamic Web-based Application Development. New York:Prentice Hall

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

[3] Newton, Harry, "Newton’s Telecom Dictionary", 14th Edition, 1998

[4] Ritchey, Tim, and Shobe, Matt, "JavaScript For Macintosh", 1996

[5] Harold, Elliotte Rusty, "Java Network Programming", 1997

[6] Biedny, David, and Monroy, Bert, "Adobe Photoshop Handbook", 2.5 Edition, 1993

92

You might also like