Вы находитесь на странице: 1из 37

MANSUKHBHAI KOTHARI NATIONAL SCHOOL

H&M ROYAL, SR.19, KONDHWA BK., OPP. TALAB FACTORY, PUNE-411048

ONLINE COMPUTER QUIZ


For the AISSCE 2019-20
As a part of the Informatics Practices Course (265)

Submitted By -
Pranav M. Deshmukh
XII-A

Under the Guidance of


Mrs. Bhavana Jain
Informatics Practices Teacher
CERTIFICATE

This is to certify that Mast. Pranav Deshmukh of Class XII-A


of Mansukhbhai Kothari National School, Pune has successfully
completed this IT Application Project on the topic “Library
Management System” during academic session 2018-19 under
the guidance of Mrs. Bhavana Jain(Subject Teacher) in partial
fulfillment of the requirements of the Informatics Practices
Practical Examination conducted by the Central Board Of
Secondary Education for the AISSCE 2019-20.
All the work related to the project has been done by the
candidate himself. The approach towards the development of the
application has been purely scientific and sincere and the related
code written is original and genuine.

--------------------------------- ----------------------------------

Teacher’s signature Examiner’s Signature

---------------------------------- ----------------------------------

Principal School Stamp


Acknowledgement

I would like to take this opportunity to express my


gratitude to all the people who have assisted with and
provided guidance in the completion of this project.
I would also like to thank my Informatics Practices
teacher Mrs. BHAVANA JAIN for her constant guidance
and kind supervision.
I would also like to thank my group members - YASHAS
DEWAN, AMARTYA JOSEPHAT and my family for
their encouragement and assistance in completing this
project.
INDEX

SR.NO. TITLE

1. Aim

2. Objectives and Scope of the Project

3. System Requirements

4. Salient Features

5. MySQL Tables

6. A Walk Through

7. Bibliography
1.AIM

This software project is developed to automate the functionalities of a

Quiz. The purpose of this project is to provide a system that provides

a quiz to test their knowledge.

An application program is tied with the database for easy access and

interface to the database. Using DATABASE CONNECTIVITY, we can

store, retrieve and manage all information in proper way in MySQL

Databases.

During coding and design of the software Project, Java NetBeans IDE,

a powerful front-end tool is used for getting Graphical User Interface

(GUI) based integrated platform and coding simplicity. As a back-end

a powerful, open source RDBMS, MySQL is used as per requirement

of the CBSE curriculum of Informatics Practices Course.


2.Objectives and Scope of the
Project
The objective of the software project is to develop a computerized MIS to automate the
functions of a Quiz. This software project is also aimed to enhance the current record
keeping system, which will help managers to retrieve the up-to-date information at right
time in right shape.

The proposed software system is expected to do the following functionality-

 To provide a user friendly and Graphical User Interface (GUI).


 The proposed system should maintain all the records and transactions, and should
generate the required reports and information when required.
 To provide graphical and user-friendly interface to interact with a centralized
database based on client-server architecture.
 To identify the critical operation procedure and possibilities of simplification using
modern IT tools and practices.
In its current scope, the software enables user to retrieve and update the information
from centralized database designed with MySQL . This software does not require much
training time of the users due to limited functionality and simplicity.

During the development of Quiz project, Java NetBeans IDE, a powerful, open source
event-driven form-based development environment is used for modular design and
future expandability of the system.

Despite of the best effort of the developer, the following limitations and functional
boundaries are visible, which limits the scope of this application software.

1. This software can store records and produce reports in pre-designed format in
soft copy. There is no facility yet to produce customized reports. Only specified
reports are covered.
2. There is no provision to calculate fine or penalty etc. for defaulter members;
however it can be developed easily with the help of adding modules.
So far as future scope of the project is concerned, firstly it is open to any modular
expansion i.e. other modules or functions can be designed and embedded to handle the
user need in future. Any part of the software and reports can be modified independently
without much effort.
3.System Requirements

1.The Hardware :

While developing the system:

 Microsoft Windows 7 Professional/Windows 8/Windows 8.1: Processor:


Intel Core i5 or equivalent. Memory: 2 GB (32-bit), 4 GB (64-bit) ...
 Ubuntu 15.04: Processor: Intel Core i5 or equivalent. Memory: 2 GB (32-
bit), 4 GB (64-bit) ...
 OS X 10.10 Intel: Processor: Dual-Core Intel. Memory: 4 GB.

2.The Softwares :

 Microsoft Windows® 10 as Operating System.


 Java NetBeans 6.9 as Front-end Development environment.
 MySQL as Back-end Sever with Database for Testing.
 MS-Word 2013 for documentation.
4.SALIENT FEATURES
A computer database works as a electronic filing system, which has a large number
of ways of cross-referencing, and this allows the user many different ways in which
to re-organize and retrieve data. A database can handle business inventory,
accounting and filing and use the information in its files to prepare summaries,
estimates and other reports. The management of data in a database system is done
by means of a general-purpose software package called a Database Management
System (DBMS). Some commercially available DBMS are MS SQL Server, MS
ACCESS, INGRES, ORACLE, and Sybase. A database management system, therefore,
is a combination of hardware and software that can be used to set up and monitor
a database, and can manage the updating and retrieval of database that has been
stored in it. Most of the database management systems have the following
capabilities:

 Creating of a table, addition, deletion, modification of records.


 Retrieving data collectively or selectively.
 The data stored can be sorted or indexed at the user's discretion and
direction.
 Various reports can be produced from the system. These may be either
standardized report or that may be specifically generated according to
specific user definition.
 Mathematical functions can be performed and the data stored in the
database can be manipulated with these functions to perform the desired
calculations.
 To maintain data integrity and database use.
The DBMS interprets and processes users' requests to retrieve information from a
database. In most cases, a query request will have to penetrate several layers of
software in the DBMS and operating system before the physical database can be
accessed. The DBMS responds to a query by invoking the appropriate subprograms,
each of which performs its special function to interpret the query, or to locate the
desired data in the database and present it in the desired order.
5.mysql code

Create Database CBSEPAYTEST;


Use CBSEPAYTEST;

PAYTEST TABLE :
Create Table Paytest(Name VARCHAR(25), Grade
VARCHAR(25), Rollno VARCHAR(25), StudentID
VARCHAR(25), Correctanswer INT(10));

Desc Paytest;
6.A Walk ThrougH
Topic - Online Computer Quiz
1.WELCOME FORM

//Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new InfoPage().setVisible(true);
this.setVisible(false);

//Code on Button2
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new UserPage().setVisible(true);
this.setVisible(false);
2.USER ADMIN FORM

//Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new UserPage().setVisible(true);
this.setVisible(false); }

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
new AdminPage().setVisible(true);
this.setVisible(false); }
//USER BUTTON CODING
1.USER FORM

//Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new UserAdminPage().setVisible(true);
this.setVisible(false); }

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
String Name=jTextField1.getText();
String Grade=jTextField2.getText();
String Rollno=jTextField3.getText();
String StudentID=jTextField4.getText();
int correctanswer=0;
if (Name.isEmpty())
JOptionPane.showMessageDialog(this,"Name not Entered");
else if (Grade.isEmpty())
JOptionPane.showMessageDialog(this,"Class not Entered");
else if (Rollno.isEmpty())
JOptionPane.showMessageDialog(this,"Rollno not Entered");
else if (Name.isEmpty())
JOptionPane.showMessageDialog(this,"StudentID not Entered");
else
{ try
{
Class.forName("java.sql.DriverManager");
Connection con;
con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3306/cbsep
aytest","root", "yashas123");
Statement stmt=(Statement) con.createStatement();
String query="insert into
paytestvalues('"+Name+"','"+Grade+"','"+Rollno+"','"+StudentID+"'
,'"+correctanswer+"');";
stmt.executeUpdate(query);
new InstructionPage().setVisible(true);
this.setVisible(false);
}
catch(Exception e)
{ JOptionPane.showMessageDialog(this, e.getMessage());
}
}
}

2.INSTRUCTION FORM

//Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new question1().setVisible(true);
this.setVisible(false); }
3.QUESTION FORMS

Que.1 //Code on Button1


private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (jRadioButton3.isSelected())
{ try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)
DriverManager.getConnection
("jdbc:mysql://localhost:3306/cbsepaytest","root", "yashas123");
Statement stmt=(Statement) con.createStatement();
String query="update paytest set
correctanswer=correctanswer+1;";
stmt.executeUpdate(query);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
new question2().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
buttonGroup1.clearSelection();
}
Que.2 //Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (jRadioButton3.isSelected())
{ try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)
DriverManager.getConnection
("jdbc:mysql://localhost:3306/cbsepaytest","root", "yashas123");
Statement stmt=(Statement) con.createStatement();
String query="update paytest set
correctanswer=correctanswer+1;";
stmt.executeUpdate(query);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
new question2().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
buttonGroup1.clearSelection();
}
Que.3 //Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (jRadioButton1.isSelected())
{ try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)
DriverManager.getConnection
("jdbc:mysql://localhost:3306/cbsepaytest","root", "yashas123");
Statement stmt=(Statement) con.createStatement();
String query="update paytest set
correctanswer=correctanswer+1;";
stmt.executeUpdate(query);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
new question2().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
buttonGroup1.clearSelection();
}
Que.4 //Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (jRadioButton4.isSelected())
{ try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)
DriverManager.getConnection
("jdbc:mysql://localhost:3306/cbsepaytest","root", "yashas123");
Statement stmt=(Statement) con.createStatement();
String query="update paytest set
correctanswer=correctanswer+1;";
stmt.executeUpdate(query);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
new question2().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
buttonGroup1.clearSelection();
}
Que.5 //Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (jRadioButton1.isSelected())
{ try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)
DriverManager.getConnection
("jdbc:mysql://localhost:3306/cbsepaytest","root", "yashas123");
Statement stmt=(Statement) con.createStatement();
String query="update paytest set
correctanswer=correctanswer+1;";
stmt.executeUpdate(query);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
new question2().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
buttonGroup1.clearSelection();
}
Que.6 //Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (jRadioButton4.isSelected())
{ try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)
DriverManager.getConnection
("jdbc:mysql://localhost:3306/cbsepaytest","root", "yashas123");
Statement stmt=(Statement) con.createStatement();
String query="update paytest set
correctanswer=correctanswer+1;";
stmt.executeUpdate(query);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
new question2().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
buttonGroup1.clearSelection();
}
Que.7 //Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (jRadioButton4.isSelected())
{ try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)
DriverManager.getConnection
("jdbc:mysql://localhost:3306/cbsepaytest","root", "yashas123");
Statement stmt=(Statement) con.createStatement();
String query="update paytest set
correctanswer=correctanswer+1;";
stmt.executeUpdate(query);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
new question2().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
buttonGroup1.clearSelection();
}
Que.8 //Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (jRadioButton4.isSelected())
{ try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)
DriverManager.getConnection
("jdbc:mysql://localhost:3306/cbsepaytest","root", "yashas123");
Statement stmt=(Statement) con.createStatement();
String query="update paytest set
correctanswer=correctanswer+1;";
stmt.executeUpdate(query);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
} }
new question2().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
buttonGroup1.clearSelection();
}

5.THANKYOU FORM

//Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0); }
//ADMIN BUTTON CODING

1.ADMIN FORM

//Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new UserAdminPage().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
if("admin".equals(jTextField1.getText()) &&
jPasswordField1.getText().equals("paytest"))
{
JOptionPane.showMessageDialog(this, "Login Successful");
new checking().setVisible(true);
this.setVisible(false);
}
else
{ JOptionPane.showMessageDialog(this, "Please Enter
Correct Username and Password");
}
}

//Code on Button3
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(" ");
jPasswordField1.setText(" ");
}
2.CHECK RESULT FORM

//Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new resulttable().setVisible(true);
this.setVisible(false);
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
2.RESULT-TABLE FORM

//Code on Button1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
DefaultTableModel model= (DefaultTableModel)
jTable1.getModel();
{ try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)
java.sql.DriverManager.getConnection
("jdbc:mysql://localhost:3306/cbsepaytest","root",
"yashas123");
Statement stmt=(Statement) con.createStatement();
String Tname="Paytest";
String query="select * from "+Tname+";";
ResultSet rs=stmt.executeQuery(query);
while(rs.next())
{ String Name = rs.getString("Name");
String Grade= rs.getString("Grade");
String RollNo= rs.getString("RollNo");
String StudentID= rs.getString("StudentID");
String CorrectAnswer= rs.getString("CorrectAnswer");
model.addRow(new Object[] {Name, Grade, RollNo,
StudentID, CorrectAnswer});
}
}
catch (Exception e)
{
JOptionPane.showMessageDialog(this,e.getMessage());
}
}

//Code on Button2
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
BIBLIOGRAPHY

 Informatics Practices for class XII - CBSE

 www.Google.com

 http://www.mysql.org

 http://www.netbeans.org

 www.slideshare.net

Вам также может понравиться