You are on page 1of 78

TABLE OF CONTENTS

TITLE PAGE NO.


1. Introduction 2
1.1 Background Problem 2
2. System Analysis 3
2.1 Existing System 3
2.2 Proposed System 4
2.3 Objectives of the Proposed System 4
2.4 Feasibility Study 4
3. Software Requirement Specification 7
3.1 Specific Requirements 7
3.2 External Interface Requirements 8
3.3 Hardware Requirements 10
3.4 Software Requirements 10
3.5 Performance Requirements 10
4. System Design 11
4.1 Data Design 11
4.2 Architectural and component-level Design 12
4.3 Software Interface Description 15
4.4 User Interface Design 16

5. Testing 17
6. Implementation 19
7. Conclusion & Scope for further development 20
8. Bibliography 21
9. Appendices
A. Architectural diagrams/Data Flow Diagram/UML/ 22
B. Tables 25
C. Forms 28
1. INTRODUCTION

2
1.1 Background Problen

The whole process of assigning test and evaluating


their scores after the test, was done manually till date. It is very time
consuming . Also it is difficult to keep the answer sheets being generated
as well as the maintenance of the record of each examination. The chance
of loss of records is high and record searching is difficult. Result
processing takes more time and the presence of more invigilators is a
must if there are more number of students to write the exam.

3
2. SYSTEM ANALYSIS

4
2.1 Existing system
The Existing system of conducting examination process
is manual. It has so many problems. So we introduce a new system,
which is fully computerized. Existing system is a large man power
process and is difficult to implement. Working of existing system is
given below: -
Student Registration is the first process . As the part of
the registration, the student has to enter his name, address etc into the
registration form. After the registration, make the question papers and it
will give to the prospective student. The question papers contain total
mark, subject, duration, questionpaper etc.
A group of person does evaluation of answer sheet. After the evaluation
of the Answer sheet , the result is published. And also make the mark list.

2.2 Proposed system


The main objective of the online examination
system is that it helps companies/institutions to conduct exams to any
number of candidates at a time, in an automated manner. It reduces the
time consumption and workload that exist in the current system of
examination. It also helps in storing the record of each examination and
the results are also stored in the system. This makes the searching of the
records easier than the existing system.
2.3 Objectives of the proposed system
The main purpose of the system is to efficiently
evaluate the candidate thoroughly through a fully automated system that
not only saves a lot of time but also gives fast results. It is a cost-effective
and popular means of mass- evaluation system.

5
The administrator of the system prepares the tests and
questions for each exam. The candidates can login through the client
computers with their register number given to them and can take the
exam. The questions are shuffled in a random order so that possibilities
for getting questions in the same order for the students who are sitting
near, is very less. A timer will monitor the time and after the time limit
the system itself submit the test. If it is before time, candidates can
submit it to view their result. The result analysis is very easy as it is done
by the system. So it saves a lot of time since no manual correction is
needed in the system. No restriction is there that the invigilator has to be
present when the students take the test.
2.4 Feasibility study
Feasibility is a measure of how beneficial the
development of the information system will be to an organization. This is
done by investigating the existing system in the area under investigation
or generally ideas about a new system. It is a test of a system proposal
according to its workability, impact on the organization, ability to meet
user needs, and effective use of resources.
Three key considerations are involved in the feasibility analysis:
economic, technical, and legal.
Economic feasibility
Economic analysis is the most frequently used method
for evaluating the effectiveness of a proposed system. It is more
commonly known as cost benefit analysis, the procedure to determine the
benefits and saving that are expected from a candidate system and
compare them with costs. If the benefits outweigh costs then a decision is
made to design and implement the system. Otherwise make alterations in
the proposed system.

6
The innovation of the new system has much influence
on the economical side of the company. Manuel system is highly cost
driven due to the high labor costs. So if a company registers with the
Online_Examination site, they can automate their day-to-day activities.
Thus the system is economically feasible.
Technical feasibility
In examining Technical feasibility of the system, more
importance is given to the hardware interaction part of the system. The
assessments of technical feasibility centers on the existing system and to
what extent it can support the proposed addition. This was based on an
outline design of system requirements in turns of inputs, files, programs,
procedures, and staff. It involves financial considerations to
accommodate technical enhancements. Online_Examination being a web
based application, it uses .Net framework, 800MHZ computer, 20 GB
Hard disk.
Legal feasibility
People are inherently resistant to change, and
computers have been known to facilitate change. An estimate should be
made about the reaction of the user staff towards the development of a
computerized system. Computer installations have something to do with
turnover, transfers and changes in job status. The introduction of a
candidate system requires special effort to educate, sell and train the staff
for conducting the business.
The system is designed such that even a computer
ignorant person can interact with the system freely. So the system
requires not much effort to train and educate people, the system is that
much legally feasible.

7
3. SOFTWARE REQUIREMENT SPECIFICATION

8
3.1 Specific Requirements

Since the Administrator and the student/user are the main target group of
our software, we will only concern about some important functions for
the admin and the user.

Administrator:-
 The administrator is the one who manipulates and maintains the
system. He can enter into the system by entering login name and
password
 That is, he is responsible for creating exams that include subject
selection and assigning scores etc.
 Again, he can add questions to the database
 add new user to the database and issue a valid ID for the user.
 He is also responsible for sending the result to the email id
provided by the user at the start of his registration.

Students/Users:-
 Can do the member registration
 After the registration , he will be issued with valid ID by the
Administrator. The user can log into the system with this ID .
 After successfully login into the system, the user moves to the
instruction web page where he will get instruction about the
examination process.
 Then after clicking the start button the exam starts and timer also
starts .In this manner, the user can take up the test and on clicking
the submit button , he will get the result of that section
immediately.

9
 He must get the test result to his email id provided at the start of
the registration
 During the exam, he is allowed to go to the prevoious questions
using a “previous” button. At the end system displays the initial
web page.
3.2 External Interface Requirements
It include the following interfaces
 User Interfaces
 Software Interfaces
 Hardware Interfaces
User Interfaces:-
The interface must be easy to understand. The user interface includes
 screen formats/organization: The introductory screen will be the
first to be displayed which will allow the users to do the member
registration.
 window format/organization: When the user chooses some other
option, then the information pertaining to that choice will be
displayed in a new window which ensures multiple windows to be
visible on the screen and the users can switch between them.
 data format: The data entered by the users will be alpha numeric.
 end messages: When there are some exceptions raising error like
entering invalid details, then error messages will be displayed
prompting the users to re-enter the details.

10
3.3 Hardware Requirements
Processor : Pentium iv
Ram : 256 mb
Hdd : 2 gb
Monitor : svga color
Key board : normal
Mouse : normal

3.4 Software Requirements

Operating System       :     Windows XP 

Front End                    :     java

Back End                    :      oracle

Browser : Internet Explorer

3.5 Performance Requirements


System should be able handle multiple users
Database updating should follow transaction processing to avoid data
inconsistency.

11
4. SYSTEM DESIGN

12
4.1 Data Flow Diagram

Figure:- Level 0

 Figure:- Level 1
 

13
 Figure:- Level 2
 

14
4.2 ER Diagram

15
16
Java Technology

Initially the language was called as “oak” but it was renamed as


“Java” in 1995. The primary motivation of this language was the
need for a platform-independent (i.e., architecture neutral)
language that could be used to create software to be embedded in
various consumer electronic devices.
 Java is a programmer’s language.
 Java is cohesive and consistent.
 Except for those constraints imposed by the Internet
environment, Java gives the programmer, full control.
 Finally, Java is to Internet programming where C was to
system programming.

Importance of Java to the Internet

Java has had a profound effect on the Internet. This is because; Java expands the
Universe of objects that can move about freely in Cyberspace. In a network, two
categories of objects are transmitted between the Server and the Personal computer.
They are: Passive information and Dynamic active programs. The Dynamic, Self-
executing programs cause serious problems in the areas of Security and probability.
But, Java addresses those concerns and by doing so, has opened the door to an
exciting new form of program called the Applet.

Java can be used to create two types of programs

Applications and Applets : An application is a program that runs on our


Computer under the operating system of that computer. It is more or less like one
creating using C or C++. Java’s ability to create Applets makes it important. An

17
Applet is an application designed to be transmitted over the Internet and executed by
a Java –compatible web browser. An applet is actually a tiny Java program,
dynamically downloaded across the network, just like an image. But the difference is,
it is an intelligent program, not just a media file. It can react to the user input and
dynamically change.

Features of Java Security

Every time you that you download a “normal” program, you are
risking a viral infection. Prior to Java, most users did not download
executable programs frequently, and those who did scan them for
viruses prior to execution. Most users still worried about the
possibility of infecting their systems with a virus. In addition,
another type of malicious program exists that must be guarded
against. This type of program can gather private information, such
as credit card numbers, bank account balances, and passwords.
Java answers both these concerns by providing a “firewall” between
a network application and your computer.

When you use a Java-compatible Web browser, you can safely


download Java applets without fear of virus infection or malicious
intent.

Portability

For programs to be dynamically downloaded to all the various types


of platforms connected to the Internet, some means of generating
portable executable code is needed .As you will see, the same
mechanism that helps ensure security also helps create portability.
Indeed, Java’s solution to these two problems is both elegant and
efficient.

18
The Byte code

The key that allows the Java to solve the security and portability
problems is that the output of Java compiler is Byte code. Byte code
is a highly optimized set of instructions designed to be executed by
the Java run-time system, which is called the Java Virtual Machine
(JVM). That is, in its standard form, the JVM is an interpreter for
byte code.

Translating a Java program into byte code helps makes it much


easier to run a program in a wide variety of environments. The
reason is, once the run-time package exists for a given system, any
Java program can run on it.

Although Java was designed for interpretation, there is technically


nothing about Java that prevents on-the-fly compilation of byte
code into native code. Sun has just completed its Just In Time (JIT)
compiler for byte code. When the JIT compiler is a part of JVM, it
compiles byte code into executable code in real time, on a piece-by-
piece, demand basis. It is not possible to compile an entire Java
program into executable code all at once, because Java performs
various run-time checks that can be done only at run time. The JIT
compiles code, as it is needed, during execution.

Java Virtual Machine (JVM)

Beyond the language, there is the Java virtual machine. The Java
virtual machine is an important element of the Java technology. The
virtual machine can be embedded within a web browser or an
operating system. Once a piece of Java code is loaded onto a
machine, it is verified. As part of the loading process, a class loader
is invoked and does byte code verification makes sure that the code
that’s has been generated by the compiler will not corrupt the
machine that it’s loaded on. Byte code verification takes place at

19
the end of the compilation process to make sure that is all accurate
and correct. So byte code verification is integral to the compiling
and executing of Java code.
Overall Description

Java Source Java byte code JavaVM

Java .Class
Picture showing the development process of JAVA Program

Java programming uses to produce byte codes and executes them. The first box
indicates that the Java source code is located in a. Java file that is processed with a
Java compiler called javac. The Java compiler produces a file called a. class file,
which contains the byte code. The .Class file is then loaded across the network or
loaded locally on your machine into the execution environment is the Java virtual
machine, which interprets and executes the byte code.

Java Architecture

Java architecture provides a portable, robust, high performing environment for


development. Java provides portability by compiling the byte codes for the Java
Virtual Machine, which is then interpreted on each platform by the run-time
environment. Java is a dynamic system, able to load code when needed from a
machine in the same room or across the planet.

Compilation of code

When you compile the code, the Java compiler creates machine code (called byte
code) for a hypothetical machine called Java Virtual Machine (JVM). The JVM is
supposed to execute the byte code. The JVM is created for overcoming the issue of
portability. The code is written and compiled for one machine and interpreted on all
machines. This machine is called Java Virtual Machine.

Compiling and interpreting Java Source Code

20
Java
PC Compiler Interpreter
Java (PC)
Source
Code Byte code
………..
……….. Macintosh Java
Compiler (Platform Interpreter
Independe (Macintosh)
………..
nt)

………… SPARC
Java
Interpreter
Compile (Spare)

During run-time the Java interpreter tricks the byte code file into thinking that it is
running on a Java Virtual Machine. In reality this could be a Intel Pentium Windows
95 or SunSARC station running Solaris or Apple Macintosh running system and all
could receive code from any computer through Internet and run the Applets.

Simple

Java was designed to be easy for the Professional programmer to learn and to use
effectively. If you are an experienced C++ programmer, learning Java will be even
easier. Because Java inherits the C/C++ syntax and many of the object oriented
features of C++. Most of the confusing concepts from C++ are either left out of Java
or implemented in a cleaner, more approachable manner. In Java there are a small
number of clearly defined ways to accomplish a given task.

Object-Oriented

Java was not designed to be source-code compatible with any other language. This
allowed the Java team the freedom to design with a blank slate. One outcome of this
was a clean usable, pragmatic approach to objects. The object model in Java is simple

21
and easy to extend, while simple types, such as integers, are kept as high-performance
non-objects.

Robust

The multi-platform environment of the Web places extraordinary demands on a


program, because the program must execute reliably in a variety of systems. The
ability to create robust programs was given a high priority in the design of Java. Java
is strictly typed language; it checks your code at compile time and run time.

Java virtually eliminates the problems of memory management and de-allocation,


which is completely automatic. In a well-written Java program, all run time errors can
–and should –be managed by your program.

22
Java Database Connectivity

What Is JDBC?
JDBC is a Java API for executing SQL statements. (As a point of
interest, JDBC is a trademarked name and is not an acronym;
nevertheless, JDBC is often thought of as standing for Java
Database Connectivity. It consists of a set of classes and interfaces
written in the Java programming language. JDBC provides a
standard API for tool/database developers and makes it possible to
write database applications using a pure Java API.
Using JDBC, it is easy to send SQL statements to virtually any
relational database. One can write a single program using the JDBC
API, and the program will be able to send SQL statements to the
appropriate database. The combinations of Java and JDBC lets a
programmer write it once and run it anywhere.
What Does JDBC Do?

Simply put, JDBC makes it possible to do three things:


 Establish a connection with a database
 Send SQL statements
 Process the results.

JDBC versus ODBC and other APIs

At this point, Microsoft's ODBC (Open Database Connectivity) API is


that probably the most widely used programming interface for
accessing relational databases. It offers the ability to connect to
almost all databases on almost all platforms.
So why not just use ODBC from Java? The answer is that you can
use ODBC from Java, but this is best done with the help of JDBC in
the form of the JDBC-ODBC Bridge, which we will cover shortly. The

23
question now becomes "Why do you need JDBC?" There are several
answers to this question:
1. ODBC is not appropriate for direct use from Java because it
uses a C interface. Calls from Java to native C code have a
number of drawbacks in the security, implementation,
robustness, and automatic portability of applications.
2. A literal translation of the ODBC C API into a Java API would
not be desirable. For example, Java has no pointers, and
ODBC makes copious use of them, including the notoriously
error-prone generic pointer "void *". You can think of JDBC as
ODBC translated into an object-oriented interface that is
natural for Java programmers.
3. ODBC is hard to learn. It mixes simple and advanced features
together, and it has complex options even for simple queries.
JDBC, on the other hand, was designed to keep simple things
simple while allowing more advanced capabilities where
required.
4. A Java API like JDBC is needed in order to enable a "pure
Java" solution. When ODBC is used, the ODBC driver manager
and drivers must be manually installed on every client
machine. When the JDBC driver is written completely in Java,
however, JDBC code is automatically installable, portable, and
secure on all Java platforms from network computers to
mainframes.

24
COADING

25
Login.java
package online;

import java.awt.Color;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.JFrame;

public class Login extends javax.swing.JFrame {

public Login() {
initComponents();

jPanel1.setBackground(new Color(255,255,250,120));

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jLabel6 = new javax.swing.JLabel();


jLabel8 = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
jLabel7Sign = new javax.swing.JLabel();
jButton3 = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jButton2 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
jPasswordField1pwd = new javax.swing.JPasswordField();
jLabel5 = new javax.swing.JLabel();
jTextField2log2 = new javax.swing.JTextField();
jComboBox1 = new javax.swing.JComboBox<>();
jLabel12 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();

jLabel6.setText("jLabel6");

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("LOGIN PAGE");
setAlwaysOnTop(true);
setPreferredSize(new java.awt.Dimension(845, 485));
setSize(new java.awt.Dimension(845, 444));

26
getContentPane().setLayout(null);

jPanel1.setBackground(new java.awt.Color(204, 204, 204));


jPanel1.setLayout(null);

jLabel7Sign.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\sign.png")); // NOI18N


jLabel7Sign.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel7SignMouseClicked(evt);
}
});
jPanel1.add(jLabel7Sign);
jLabel7Sign.setBounds(600, 280, 130, 50);

jButton3.setFont(new java.awt.Font("Franklin Gothic Medium", 1, 15)); // NOI18N


jButton3.setText("REGISTER");
jButton3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jPanel1.add(jButton3);
jButton3.setBounds(600, 280, 130, 40);

jLabel2.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\cancel-button-icon-
63471.png")); // NOI18N
jPanel1.add(jLabel2);
jLabel2.setBounds(420, 290, 30, 40);

jButton1.setFont(new java.awt.Font("Franklin Gothic Medium", 1, 15)); // NOI18N


jButton1.setText("CANCEL");
jButton1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jPanel1.add(jButton1);
jButton1.setBounds(340, 290, 120, 40);

jLabel1.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\login_icon.png")); //
NOI18N
jPanel1.add(jLabel1);
jLabel1.setBounds(280, 290, 40, 40);

jButton2.setFont(new java.awt.Font("Franklin Gothic Medium", 1, 15)); // NOI18N


jButton2.setText("LOGIN");
jButton2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2MouseClicked(evt);
}

27
});
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jPanel1.add(jButton2);
jButton2.setBounds(210, 290, 110, 40);

jLabel3.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\animated-book-image-
0032.gif")); // NOI18N
jPanel1.add(jLabel3);
jLabel3.setBounds(580, 130, 140, 139);

jPasswordField1pwd.setBackground(new java.awt.Color(218, 223, 225));


jPanel1.add(jPasswordField1pwd);
jPasswordField1pwd.setBounds(230, 220, 140, 25);

jLabel5.setFont(new java.awt.Font("Comic Sans MS", 0, 18)); // NOI18N


jLabel5.setForeground(new java.awt.Color(255, 255, 255));
jLabel5.setText("LOGIN AS:");
jPanel1.add(jLabel5);
jLabel5.setBounds(100, 260, 110, 20);

jTextField2log2.setBackground(new java.awt.Color(218, 223, 225));


jPanel1.add(jTextField2log2);
jTextField2log2.setBounds(230, 175, 144, 26);

jComboBox1.setFont(new java.awt.Font("Cambria", 1, 14)); // NOI18N


jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "TEACHER",
"STUDENT" }));
jPanel1.add(jComboBox1);
jComboBox1.setBounds(210, 250, 160, 30);

jLabel12.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\login page.png")); //


NOI18N
jPanel1.add(jLabel12);
jLabel12.setBounds(30, 30, 750, 340);

getContentPane().add(jPanel1);
jPanel1.setBounds(20, 20, 810, 400);

jLabel4.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\apple.jpg")); // NOI18N


jLabel4.setText("jLabel4");
getContentPane().add(jLabel4);
jLabel4.setBounds(0, 0, 850, 450);

getAccessibleContext().setAccessibleParent(this);

pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents

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


FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:

28
}//GEN-LAST:event_jButton1ActionPerformed

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


FIRST:event_jButton3ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton3ActionPerformed

private void jLabel7SignMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jLabel7SignMouseClicked
Register lg=new Register();
lg.setVisible(true);
lg.pack();
lg.setLocationRelativeTo(null);
lg.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jLabel7SignMouseClicked

private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton2MouseClicked

}//GEN-LAST:event_jButton2MouseClicked

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


FIRST:event_jButton2ActionPerformed
String sp=(String)jComboBox1.getSelectedItem();
if(sp.equalsIgnoreCase("TEACHER"))
{

con();
}
else if(sp.equalsIgnoreCase("STUDENT"))
{

connect();
}
}//GEN-LAST:event_jButton2ActionPerformed

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(Login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {

29
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Login.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 Login().setVisible(true);
}
});
}

void con()
{
String s1 = jTextField2log2.getText();
String s2 = jPasswordField1pwd.getText();

try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","puja@123");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from Staff_master");
while(rs.next())
{
String usernm=rs.getString(1);
String pwd=rs.getString(14);
if(s1.equals(usernm)&& s2.equals(pwd))
{

new MainMenu().setVisible(true);
}
}
}
catch(Exception e){}

}
void connect()
{
String s1 = jTextField2log2.getText();
String s2 = jPasswordField1pwd.getText();

try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","puja@123");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from Student_master");

30
while(rs.next())
{
String usernm=rs.getString(1);
String pwd=rs.getString(12);
if(s1.equals(usernm)&& s2.equals(pwd))
{

new Mainmenu_Student(usernm).setVisible(true);
}
}
}
catch(Exception e){}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JComboBox<String> jComboBox1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel12;
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 jLabel7Sign;
private javax.swing.JLabel jLabel8;
private javax.swing.JPanel jPanel1;
private javax.swing.JPasswordField jPasswordField1pwd;
private javax.swing.JTextField jTextField2log2;
// End of variables declaration//GEN-END:variables
}

Mainmenu.java

package online;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.JFrame;

public class MainMenu extends javax.swing.JFrame {

public MainMenu() {
initComponents();

31
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jLabel2 = new javax.swing.JLabel();


jButton4Qstn = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();
jButton8logout = new javax.swing.JButton();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jButton3Std = new javax.swing.JButton();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jButton5Staf = new javax.swing.JButton();
jLabel13 = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
jButton6Exam = new javax.swing.JButton();
jLabel15 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
jButton2Reslt = new javax.swing.JButton();
jLabel17 = new javax.swing.JLabel();
jButton7Time = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
jLabel18 = new javax.swing.JLabel();
jButton2 = new javax.swing.JButton();
jLabel19 = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("STAFF MAIN MENU PAGE");
setAlwaysOnTop(true);
setSize(new java.awt.Dimension(905, 512));
getContentPane().setLayout(null);

jLabel2.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\2309c05932b453d9-exams-
logo.png")); // NOI18N
jLabel2.setToolTipText("Click here to go Question Bank");
getContentPane().add(jLabel2);
jLabel2.setBounds(700, 60, 120, 90);

jButton4Qstn.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton4QstnMouseClicked(evt);
}
});
getContentPane().add(jButton4Qstn);
jButton4Qstn.setBounds(690, 50, 150, 100);

32
jLabel4.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\user-login.png")); //
NOI18N
jLabel4.setToolTipText("Click Here to go HOME");
getContentPane().add(jLabel4);
jLabel4.setBounds(720, 250, 100, 90);

jButton8logout.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton8logoutMouseClicked(evt);
}
});
getContentPane().add(jButton8logout);
jButton8logout.setBounds(700, 240, 140, 110);

jLabel5.setFont(new java.awt.Font("Comic Sans MS", 1, 16)); // NOI18N


jLabel5.setText("LOG OUT");
getContentPane().add(jLabel5);
jLabel5.setBounds(730, 350, 100, 20);

jLabel6.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\blog.png")); // NOI18N


jLabel6.setToolTipText("Click here to go Student Page");
getContentPane().add(jLabel6);
jLabel6.setBounds(320, 50, 98, 90);

jButton3Std.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton3StdMouseClicked(evt);
}
});
getContentPane().add(jButton3Std);
jButton3Std.setBounds(310, 50, 120, 100);

jLabel7.setFont(new java.awt.Font("Comic Sans MS", 1, 16)); // NOI18N


jLabel7.setText("STUDENT");
getContentPane().add(jLabel7);
jLabel7.setBounds(330, 150, 100, 20);

jLabel8.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\Teacher-icon.png")); //
NOI18N
jLabel8.setToolTipText("Click here to go Staff Page");
getContentPane().add(jLabel8);
jLabel8.setBounds(510, 50, 90, 100);

jLabel9.setFont(new java.awt.Font("Comic Sans MS", 1, 16)); // NOI18N


jLabel9.setText("STAFF");
getContentPane().add(jLabel9);
jLabel9.setBounds(530, 160, 70, 20);

jLabel10.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\Firefox_Home_-
_logo.png")); // NOI18N
jLabel10.setToolTipText("Click Here to go HOME");
getContentPane().add(jLabel10);
jLabel10.setBounds(140, 60, 90, 90);
getContentPane().add(jButton1);
jButton1.setBounds(120, 50, 120, 100);

33
jLabel11.setFont(new java.awt.Font("Comic Sans MS", 1, 16)); // NOI18N
jLabel11.setText("HOME");
getContentPane().add(jLabel11);
jLabel11.setBounds(160, 150, 60, 20);

jLabel12.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\exam.png")); // NOI18N


jLabel12.setToolTipText("Click Here to go EXAM MASTER");
getContentPane().add(jLabel12);
jLabel12.setBounds(110, 240, 120, 90);

jButton5Staf.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton5StafMouseClicked(evt);
}
});
jButton5Staf.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5StafActionPerformed(evt);
}
});
getContentPane().add(jButton5Staf);
jButton5Staf.setBounds(500, 50, 130, 100);

jLabel13.setFont(new java.awt.Font("Comic Sans MS", 1, 16)); // NOI18N


jLabel13.setText("EXAM");
getContentPane().add(jLabel13);
jLabel13.setBounds(140, 350, 70, 20);

jLabel14.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\time.png")); // NOI18N


jLabel14.setToolTipText("Click Here to go HOME");
getContentPane().add(jLabel14);
jLabel14.setBounds(320, 250, 90, 80);

jButton6Exam.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton6ExamMouseClicked(evt);
}
});
getContentPane().add(jButton6Exam);
jButton6Exam.setBounds(110, 240, 130, 110);

jLabel15.setFont(new java.awt.Font("Comic Sans MS", 1, 16)); // NOI18N


jLabel15.setText("TIME TABLE");
getContentPane().add(jLabel15);
jLabel15.setBounds(310, 350, 130, 20);

jLabel16.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\result.png")); // NOI18N


jLabel16.setToolTipText("Click Here to go HOME");
getContentPane().add(jLabel16);
jLabel16.setBounds(520, 240, 90, 100);

jButton2Reslt.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2ResltMouseClicked(evt);
}
});

34
getContentPane().add(jButton2Reslt);
jButton2Reslt.setBounds(510, 240, 130, 110);

jLabel17.setFont(new java.awt.Font("Comic Sans MS", 1, 16)); // NOI18N


jLabel17.setText("RESULT");
getContentPane().add(jLabel17);
jLabel17.setBounds(540, 350, 80, 20);

jButton7Time.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton7TimeMouseClicked(evt);
}
});
jButton7Time.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7TimeActionPerformed(evt);
}
});
getContentPane().add(jButton7Time);
jButton7Time.setBounds(300, 240, 130, 110);

jLabel3.setFont(new java.awt.Font("Comic Sans MS", 1, 16)); // NOI18N


jLabel3.setText("QUESTION");
getContentPane().add(jLabel3);
jLabel3.setBounds(710, 160, 120, 20);

jLabel18.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\Icon_File\\Exit.png")); //
NOI18N
getContentPane().add(jLabel18);
jLabel18.setBounds(820, 420, 50, 50);

jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2MouseClicked(evt);
}
});
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
getContentPane().add(jButton2);
jButton2.setBounds(810, 410, 70, 60);

jLabel19.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\border.png")); // NOI18N


getContentPane().add(jLabel19);
jLabel19.setBounds(0, 0, 100, 490);

jLabel1.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\Clear_Best-Online-
MAsters-In-Health-Informatics.jpg")); // NOI18N
getContentPane().add(jLabel1);
jLabel1.setBounds(0, 0, 900, 490);

pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents

35
private void jButton3StdMouseClicked(java.awt.event.MouseEvent evt) {//GEN-
FIRST:event_jButton3StdMouseClicked
student_page spg=new student_page();
spg.setVisible(true);
spg.pack();
spg.setLocationRelativeTo(null);
spg.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton3StdMouseClicked

private void jButton5StafMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton5StafMouseClicked
Staff_Page pg=new Staff_Page();
pg.setVisible(true);
pg.pack();
pg.setLocationRelativeTo(null);
pg.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton5StafMouseClicked

private void jButton4QstnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton4QstnMouseClicked
Question_Bank qst=new Question_Bank();
qst.setVisible(true);
qst.pack();
qst.setLocationRelativeTo(null);
qst.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton4QstnMouseClicked

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


FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton2ActionPerformed

private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton2MouseClicked
Login t=new Login();
t.setVisible(true);
t.pack();
t.setLocationRelativeTo(null);
t.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton2MouseClicked

private void jButton5StafActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton5StafActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton5StafActionPerformed

private void jButton7TimeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton7TimeMouseClicked

TimeTable_admin ex=new TimeTable_admin();


ex.setVisible(true);

36
ex.pack();
ex.setLocationRelativeTo(null);
ex.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton7TimeMouseClicked

private void jButton6ExamMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton6ExamMouseClicked
ExamMaster ex=new ExamMaster();
ex.setVisible(true);
ex.pack();
ex.setLocationRelativeTo(null);
ex.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton6ExamMouseClicked

private void jButton8logoutMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton8logoutMouseClicked
HomePage hm=new HomePage();
hm.setVisible(true);
hm.pack();
hm.setLocationRelativeTo(null);
hm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton8logoutMouseClicked

private void jButton2ResltMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton2ResltMouseClicked
Result_Sheet re=new Result_Sheet();
re.setVisible(true);
re.pack();
re.setLocationRelativeTo(null);
re.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton2ResltMouseClicked

private void jButton7TimeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton7TimeActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton7TimeActionPerformed

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;

37
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(MainMenu.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 MainMenu().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton2Reslt;
private javax.swing.JButton jButton3Std;
private javax.swing.JButton jButton4Qstn;
private javax.swing.JButton jButton5Staf;
private javax.swing.JButton jButton6Exam;
private javax.swing.JButton jButton7Time;
private javax.swing.JButton jButton8logout;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel18;
private javax.swing.JLabel jLabel19;
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;

38
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
// End of variables declaration//GEN-END:variables
}
Register.java

package online;

import javax.swing.JFrame;

public class Register extends javax.swing.JFrame {

public Register() {
initComponents();
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jDesktopPane1 = new javax.swing.JDesktopPane();


jPanel1 = new javax.swing.JPanel();
jLabel3 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jButton1Staff = new javax.swing.JButton();
jButton2Student = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();
jLabel18 = new javax.swing.JLabel();
jButton2 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("REGISTRATION PANEL");
setAlwaysOnTop(true);

jPanel1.setLayout(null);

jLabel3.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\register.png")); // NOI18N


jPanel1.add(jLabel3);
jLabel3.setBounds(700, 340, 50, 60);

jLabel2.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\register.png")); // NOI18N


jPanel1.add(jLabel2);
jLabel2.setBounds(240, 220, 50, 60);

jLabel5.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\student.png")); // NOI18N


jPanel1.add(jLabel5);
jLabel5.setBounds(520, 140, 230, 210);

jButton1Staff.setBackground(new java.awt.Color(102, 0, 51));


jButton1Staff.setFont(new java.awt.Font("David", 1, 20)); // NOI18N

39
jButton1Staff.setForeground(new java.awt.Color(255, 255, 255));
jButton1Staff.setText("STAFF SIGNUP");
jButton1Staff.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jButton1Staff.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton1StaffMouseClicked(evt);
}
});
jButton1Staff.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1StaffActionPerformed(evt);
}
});
jPanel1.add(jButton1Staff);
jButton1Staff.setBounds(60, 220, 250, 60);

jButton2Student.setBackground(new java.awt.Color(102, 0, 51));


jButton2Student.setFont(new java.awt.Font("David", 1, 20)); // NOI18N
jButton2Student.setForeground(new java.awt.Color(255, 255, 255));
jButton2Student.setText("STUDENT SIGNUP");
jButton2Student.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jButton2Student.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2StudentMouseClicked(evt);
}
});
jPanel1.add(jButton2Student);
jButton2Student.setBounds(500, 340, 260, 60);

jLabel4.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\teacher-23.png")); //
NOI18N
jPanel1.add(jLabel4);
jLabel4.setBounds(70, 40, 250, 170);

jLabel18.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\Icon_File\\Exit.png")); //
NOI18N
jPanel1.add(jLabel18);
jLabel18.setBounds(760, 10, 50, 50);

jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2MouseClicked(evt);
}
});
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jPanel1.add(jButton2);
jButton2.setBounds(750, 0, 70, 60);

jLabel1.setFont(new java.awt.Font("Cooper Black", 1, 18)); // NOI18N


jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\original.jpg")); // NOI18N
jLabel1.setText("jLabel1");

40
jPanel1.add(jLabel1);
jLabel1.setBounds(0, 0, 820, 440);

jDesktopPane1.setLayer(jPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1);


jDesktopPane1.setLayout(jDesktopPane1Layout);
jDesktopPane1Layout.setHorizontalGroup(
jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jDesktopPane1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 821,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jDesktopPane1Layout.setVerticalGroup(
jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jDesktopPane1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 418, Short.MAX_VALUE)
.addContainerGap())
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jDesktopPane1, javax.swing.GroupLayout.Alignment.TRAILING)
);

pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents

private void jButton2StudentMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton2StudentMouseClicked
Student_register str=new Student_register();
str.setVisible(true);
str.pack();
str.setLocationRelativeTo(null);
str.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton2StudentMouseClicked

private void jButton1StaffMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton1StaffMouseClicked
Staff_Registration stfr=new Staff_Registration();
stfr.setVisible(true);
stfr.pack();

41
stfr.setLocationRelativeTo(null);
stfr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton1StaffMouseClicked

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


FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton2ActionPerformed

private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton2MouseClicked
Login mg=new Login();
mg.setVisible(true);
mg.pack();
mg.setLocationRelativeTo(null);
mg.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose();
}//GEN-LAST:event_jButton2MouseClicked

private void jButton1StaffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton1StaffActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton1StaffActionPerformed

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
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(Register.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
}
//</editor-fold>

42
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Register().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton jButton1Staff;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton2Student;
private javax.swing.JDesktopPane jDesktopPane1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel18;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JPanel jPanel1;
// End of variables declaration//GEN-END:variables
}
Questionbank.java

package online;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;

/**
*
* @author USER
*/
public class Question_Bank extends javax.swing.JFrame {
JDialog jd;
JLabel l1;
/**
* Creates new form Question_Bank
*/
public Question_Bank() {
initComponents();
}

/**

43
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jDesktopPane1 = new javax.swing.JDesktopPane();


jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel1 = new javax.swing.JPanel();
jLabel5 = new javax.swing.JLabel();
jTextField4Snm = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jEditorPane1 = new javax.swing.JEditorPane();
jLabel7 = new javax.swing.JLabel();
jComboBox8Ctype = new javax.swing.JComboBox<>();
jLabel8 = new javax.swing.JLabel();
jComboBox8Ctype1 = new javax.swing.JComboBox<>();
jLabel9 = new javax.swing.JLabel();
jComboBox8Ctype2 = new javax.swing.JComboBox<>();
jLabel10 = new javax.swing.JLabel();
jTextField4Qid1 = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
jScrollPane2 = new javax.swing.JScrollPane();
jEditorPane2 = new javax.swing.JEditorPane();
jLabel12 = new javax.swing.JLabel();
jScrollPane3 = new javax.swing.JScrollPane();
jEditorPane3 = new javax.swing.JEditorPane();
jLabel13 = new javax.swing.JLabel();
jScrollPane4 = new javax.swing.JScrollPane();
jEditorPane4 = new javax.swing.JEditorPane();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
jTextField4Snm2 = new javax.swing.JTextField();
jLabel17 = new javax.swing.JLabel();
jTextField1Eid = new javax.swing.JTextField();
jLabel19 = new javax.swing.JLabel();
jButton2submit = new javax.swing.JButton();
jLabel21 = new javax.swing.JLabel();
jButton3Cancel = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jScrollPane11 = new javax.swing.JScrollPane();
jEditorPane11 = new javax.swing.JEditorPane();
jComboBox8Ctype3 = new javax.swing.JComboBox<>();
jLabel1 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setAlwaysOnTop(true);

jPanel1.setLayout(null);

jLabel5.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N

44
jLabel5.setText("Question ID :");
jPanel1.add(jLabel5);
jLabel5.setBounds(310, 440, 100, 30);

jTextField4Snm.setBackground(new java.awt.Color(230, 233, 245));


jTextField4Snm.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0,
0)));
jTextField4Snm.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField4SnmActionPerformed(evt);
}
});
jPanel1.add(jTextField4Snm);
jTextField4Snm.setBounds(540, 140, 140, 30);

jLabel6.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel6.setText("Question Type :");
jPanel1.add(jLabel6);
jLabel6.setBounds(10, 100, 120, 30);

jScrollPane1.setViewportView(jEditorPane1);

jPanel1.add(jScrollPane1);
jScrollPane1.setBounds(150, 180, 600, 40);

jLabel7.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel7.setText("Question :");
jPanel1.add(jLabel7);
jLabel7.setBounds(50, 10, 80, 30);

jComboBox8Ctype.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N


jComboBox8Ctype.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Option
A", "Option B", "Option C", "Option D" }));
jComboBox8Ctype.setToolTipText("");
jPanel1.add(jComboBox8Ctype);
jComboBox8Ctype.setBounds(150, 380, 140, 30);

jLabel8.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel8.setText("Subject Type :");
jPanel1.add(jLabel8);
jLabel8.setBounds(410, 100, 110, 30);

jComboBox8Ctype1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N


jComboBox8Ctype1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[]
{ "DCCN", "JAVA", "SE", "C++", "C", "OR", "OS", "CO", "COAS", " " }));
jComboBox8Ctype1.setToolTipText("");
jPanel1.add(jComboBox8Ctype1);
jComboBox8Ctype1.setBounds(540, 100, 140, 30);

jLabel9.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel9.setText("Option A :");
jPanel1.add(jLabel9);
jLabel9.setBounds(50, 180, 80, 30);

jComboBox8Ctype2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

45
jComboBox8Ctype2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[]
{ "SELECT", "BCA", "BBA", "MCA", "MBA", "BSC", "MSC" }));
jComboBox8Ctype2.setToolTipText("");
jPanel1.add(jComboBox8Ctype2);
jComboBox8Ctype2.setBounds(150, 140, 140, 30);

jLabel10.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel10.setText("For Course :");
jPanel1.add(jLabel10);
jLabel10.setBounds(30, 140, 100, 30);

jTextField4Qid1.setBackground(new java.awt.Color(230, 233, 245));


jTextField4Qid1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0,
0)));
jTextField4Qid1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField4Qid1ActionPerformed(evt);
}
});
jPanel1.add(jTextField4Qid1);
jTextField4Qid1.setBounds(430, 440, 140, 30);

jLabel11.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel11.setText("Full Marks :");
jPanel1.add(jLabel11);
jLabel11.setBounds(430, 140, 90, 30);

jScrollPane2.setViewportView(jEditorPane2);

jPanel1.add(jScrollPane2);
jScrollPane2.setBounds(150, 10, 600, 80);

jLabel12.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel12.setText("Option B :");
jPanel1.add(jLabel12);
jLabel12.setBounds(50, 240, 80, 30);

jScrollPane3.setViewportView(jEditorPane3);

jPanel1.add(jScrollPane3);
jScrollPane3.setBounds(150, 230, 600, 40);

jLabel13.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel13.setText("Option C :");
jPanel1.add(jLabel13);
jLabel13.setBounds(50, 280, 80, 30);

jScrollPane4.setViewportView(jEditorPane4);

jPanel1.add(jScrollPane4);
jScrollPane4.setBounds(150, 280, 600, 40);

jLabel14.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel14.setText("Option D :");
jPanel1.add(jLabel14);
jLabel14.setBounds(50, 330, 80, 30);

46
jLabel15.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N
jLabel15.setText("Right Answer :");
jPanel1.add(jLabel15);
jLabel15.setBounds(20, 380, 110, 30);

jLabel16.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel16.setText("Negative Marks :");
jPanel1.add(jLabel16);
jLabel16.setBounds(20, 480, 120, 30);

jTextField4Snm2.setBackground(new java.awt.Color(230, 233, 245));


jTextField4Snm2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0,
0)));
jTextField4Snm2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField4Snm2ActionPerformed(evt);
}
});
jPanel1.add(jTextField4Snm2);
jTextField4Snm2.setBounds(150, 480, 140, 30);

jLabel17.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N


jLabel17.setText("Entry UserId :");
jPanel1.add(jLabel17);
jLabel17.setBounds(30, 440, 100, 30);

jTextField1Eid.setBackground(new java.awt.Color(230, 233, 245));


jTextField1Eid.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0,
0)));
jTextField1Eid.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1EidActionPerformed(evt);
}
});
jPanel1.add(jTextField1Eid);
jTextField1Eid.setBounds(150, 440, 140, 30);

jLabel19.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\Icon_File\\TfSave.png")); //
NOI18N
jPanel1.add(jLabel19);
jLabel19.setBounds(518, 495, 18, 18);

jButton2submit.setBackground(new java.awt.Color(0, 51, 51));


jButton2submit.setFont(new java.awt.Font("Cambria", 1, 18)); // NOI18N
jButton2submit.setForeground(new java.awt.Color(204, 255, 255));
jButton2submit.setText("SUBMIT");
jButton2submit.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jButton2submit.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
jButton2submit.setIconTextGap(10);
jButton2submit.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2submitMouseClicked(evt);
}
});
jButton2submit.addActionListener(new java.awt.event.ActionListener() {

47
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2submitActionPerformed(evt);
}
});
jPanel1.add(jButton2submit);
jButton2submit.setBounds(430, 490, 110, 31);

jLabel21.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\Icon_File\\TfNext.png")); //
NOI18N
jPanel1.add(jLabel21);
jLabel21.setBounds(640, 495, 18, 18);

jButton3Cancel.setBackground(new java.awt.Color(0, 51, 51));


jButton3Cancel.setFont(new java.awt.Font("Cambria", 1, 18)); // NOI18N
jButton3Cancel.setForeground(new java.awt.Color(204, 255, 255));
jButton3Cancel.setText("NEXT");
jButton3Cancel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jButton3Cancel.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
jButton3Cancel.setIconTextGap(10);
jButton3Cancel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton3CancelMouseClicked(evt);
}
});
jButton3Cancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3CancelActionPerformed(evt);
}
});
jPanel1.add(jButton3Cancel);
jButton3Cancel.setBounds(560, 490, 120, 31);

jLabel3.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\Icon_File\\TfPrevious.png")); //
NOI18N
jPanel1.add(jLabel3);
jLabel3.setBounds(10, 10, 20, 14);

jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton1MouseClicked(evt);
}
});
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jPanel1.add(jButton1);
jButton1.setBounds(0, 0, 40, 30);

jScrollPane11.setViewportView(jEditorPane11);

jPanel1.add(jScrollPane11);
jScrollPane11.setBounds(150, 330, 600, 40);

jComboBox8Ctype3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

48
jComboBox8Ctype3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "MCQ",
"SHORT", "LONG" }));
jComboBox8Ctype3.setToolTipText("");
jPanel1.add(jComboBox8Ctype3);
jComboBox8Ctype3.setBounds(150, 100, 140, 30);

jLabel1.setIcon(new javax.swing.ImageIcon("D:\\Online_exam\\img\\3D-Abstract-Gradient-
Background-Vector-01.jpg")); // NOI18N
jPanel1.add(jLabel1);
jLabel1.setBounds(0, 0, 770, 530);

jTabbedPane1.addTab("New Question Entry", jPanel1);

jDesktopPane1.setLayer(jTabbedPane1, javax.swing.JLayeredPane.DEFAULT_LAYER);

javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1);


jDesktopPane1.setLayout(jDesktopPane1Layout);
jDesktopPane1Layout.setHorizontalGroup(
jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jDesktopPane1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 777,
Short.MAX_VALUE)
.addContainerGap())
);
jDesktopPane1Layout.setVerticalGroup(
jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jDesktopPane1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 557,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jDesktopPane1, javax.swing.GroupLayout.Alignment.TRAILING)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);

pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents

private void jTextField4SnmActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jTextField4SnmActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField4SnmActionPerformed

49
private void jTextField4Qid1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_jTextField4Qid1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField4Qid1ActionPerformed

private void jTextField4Snm2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jTextField4Snm2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField4Snm2ActionPerformed

private void jTextField1EidActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jTextField1EidActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField1EidActionPerformed

private void jButton2submitMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton2submitMouseClicked

}//GEN-LAST:event_jButton2submitMouseClicked

private void jButton2submitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton2submitActionPerformed
conn();
}//GEN-LAST:event_jButton2submitActionPerformed

private void jButton3CancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton3CancelActionPerformed

}//GEN-LAST:event_jButton3CancelActionPerformed

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


FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton1ActionPerformed

private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton1MouseClicked
MainMenu mg=new MainMenu();
mg.setVisible(true);
mg.pack();
mg.setLocationRelativeTo(null);
mg.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.dispose(); // TODO add your handling code here:
}//GEN-LAST:event_jButton1MouseClicked

private void jButton3CancelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-


FIRST:event_jButton3CancelMouseClicked
clear();
}//GEN-LAST:event_jButton3CancelMouseClicked

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */

50
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
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(Question_Bank.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Question_Bank.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Question_Bank.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Question_Bank.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 Question_Bank().setVisible(true);
}
});
}
void conn()
{

String s1=jTextField4Qid1.getText();
String s2=jEditorPane2.getText();
String s3=(String)jComboBox8Ctype.getSelectedItem();
String s4=(String)jComboBox8Ctype1.getSelectedItem();
String s5=(String)jComboBox8Ctype2.getSelectedItem();
String s6=jEditorPane1.getText();
String s7=jEditorPane3.getText();
String s8=jEditorPane4.getText();
String s9=jEditorPane11.getText();
String s10=(String)jComboBox8Ctype.getSelectedItem();
String s11=jTextField1Eid.getText();

51
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","puja@123");
PreparedStatement st=con.prepareStatement("insert into Question_Bank
values(?,?,?,?,?,?,?,?,?,?,?,?,?)");
st.setString(1,s1);
st.setString(2,s2);
st.setString(3,s3);
st.setString(4,s4);
st.setString(5,s5);
int xx=Integer.valueOf(jTextField4Snm.getText());
st.setInt(6,xx);
st.setString(7,s6);
st.setString(8,s7);
st.setString(9,s8);
st.setString(10,s9);
st.setString(11,s10);
int xy=Integer.valueOf(jTextField4Snm2.getText());
st.setInt(12,xy);
st.setString(13,s11);
int i=st.executeUpdate();
jd=new JDialog(this);
jd.setSize(200,100);
l1=new JLabel("Your data submitted successfully");
jd.add(l1);
jd.show(true);
}
catch(ClassNotFoundException | SQLException e) {
JOptionPane.showMessageDialog(null,e);

}
}

void clear()
{
jEditorPane2.setText(null);
jTextField4Snm.setText(null);
jEditorPane1.setText(null);
jEditorPane3.setText(null);
jEditorPane4.setText(null);
jEditorPane11.setText(null);
jTextField1Eid.setText(null);
jTextField4Qid1.setText(null);
jTextField4Snm2.setText(null);

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2submit;
private javax.swing.JButton jButton3Cancel;
private javax.swing.JComboBox<String> jComboBox8Ctype;
private javax.swing.JComboBox<String> jComboBox8Ctype1;
private javax.swing.JComboBox<String> jComboBox8Ctype2;

52
private javax.swing.JComboBox<String> jComboBox8Ctype3;
private javax.swing.JDesktopPane jDesktopPane1;
private javax.swing.JEditorPane jEditorPane1;
private javax.swing.JEditorPane jEditorPane11;
private javax.swing.JEditorPane jEditorPane2;
private javax.swing.JEditorPane jEditorPane3;
private javax.swing.JEditorPane jEditorPane4;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel19;
private javax.swing.JLabel jLabel21;
private javax.swing.JLabel jLabel3;
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.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane11;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JScrollPane jScrollPane4;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JTextField jTextField1Eid;
private javax.swing.JTextField jTextField4Qid1;
private javax.swing.JTextField jTextField4Snm;
private javax.swing.JTextField jTextField4Snm2;
// End of variables declaration//GEN-END:variables
}

53
SCREEN

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
5. TESTING

System testing is the stage of implementation, which is aimed


at ensuring that the system works accurately and efficiently before

69
live operation commences. Testing is vital to the success of the
system. Testing is the process of executing a program with the explicit
intention of finding errors that is making the program fail. The tester
may analysts, programmer or a specialist trained for software testing,
is actually trying to make the program fail. Analysts know that an
effective testing program does not guarantee system reliability.
Therefore reliability must be designed into the system.

Unit Testing
In unit testing we have to test the programs making up the
system. For this reason unit testing is sometimes called as the Program
testing. The software units in a system are modules and routines that
are assembled and integrated to perform a specific function.

Unit testing focuses first on modules, independently of one another,


to locate errors. This enables, to detect errors in coding and logic that
are contained with in the module alone. Unit testing can be
performed from the bottom up, starting with the lowest level modules
and proceeding one at a time. Unit testing is done for each module in
Online_Examination. This ensures that the value we enter match with
the data type and within the specified limits.

Integration Testing
Data can be lost across any interface, one module can have an
adverse effect on another, sub functions when combined, may not
produce the desired major functions. Integration testing is a systematic
testing for conducting tests to uncover errors associated within the

interface. The objective is to take unit tested modules and build a


program structure. All the modules are combined and tested as a

70
whole. Here correction is difficult because the vast expenses of the
entire program complicate the isolation of causes. Thus in the
integration testing step, all the errors are corrected for the next testing
steps. In Online_Examination each module is integrated and tested.
This testing provides the assurance that the application is well
integrated functional unit with smooth transition of data.

Validation Testing
At the culmination of integration testing, software is completely
assembled as a package; interfacing errors have been recovered and
corrected and a final series of a software tests-validation tests begin.
Validation testing can be defined in many ways but a simple definition is
that validation succeeds when the software functions in a manner that can
be reasonably expected by the customer.
In validation testing if user wants to enter the numeric value he
can only enter the numeric value not the text value. For e.g.: in phone
number field user can only enter numeric value to it. The system is user
friendly with user guide and messages to explain further procedures. An
attempt has been made to perfect the process by incorporating validation
at each level.

71
6. IMPLEMENTATION

72
Implementation is the stage in the project where the
theoretical design is turned into a working system and is giving
confidence on the new system for the users that it will work efficiently
and effectively. It involves careful planning, investigation of the current
system and its constraints on implementation, design of methods to
achieve the change over, an evaluation, of change over methods. Apart
from planning major task of preparing the implementation are education
and training of users. The more complex system being implemented, the
more involved will be the system analysis and the design effort required
just for implementation.

An implementation co-ordination committee based on policies


of individual organization has been appointed. The implementation
process begins with preparing a plan for the implementation of the
system. According to this plan, the activities are to be carried out,
discussions are made regarding the equipment and resources and the
additional equipment has to be acquired to implement the new system.

Implementation is the final and important phase. This is the


most critical stage in achieving a successful new system and in giving the
users confidence that the new system will work is effective. The system
can be implemented only after thorough testing. This method also offers
the greatest security since the old system can take over if the errors are
found or inability to handle certain type of transactions while using the
new system.

73
7. CONCLUSION & SCOPE FOR FURTHER
DEVELOPMENT

74
Online_Examination has been developed and the system was tested
with proper data. The system results in regular timing preparation of the
required output. In comparison with the manual system, the benefit
under a computer system considerable in to saving of manpower,
working hour and efforts.
It can observe that the information required can be
obtained with ease and accuracy in the computerized system. The user
with minimum knowledge about computer can be able operate the system
easily. Online massage has been provided to help the user to take
necessary, correct action while using the system. Various validation
techniques have been used to implement accuracy of data in all formats
of input. The system has produced all the report required by the
management .
This software can be used by any institute as it can be modified
easily; additional features can be added without interrupting the normal
functioning of the system.

75
8. BIBLIOGRAPHY

76
1) System Analysis and Design
Elias. M.Award, Galgotia
Publication Pvt.Ltd,1991

3) Programming Asp.Net
Gary Cornell Jonathan Morrison,
Pares Publishers,1992

3) Software Engineering
Roger.S.Pressman, McGraw-Hill
International Editions,1991

77
78

You might also like