0% found this document useful (0 votes)
36 views47 pages

Project Hard Copy Pdf-1

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

Project Hard Copy Pdf-1

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

A

Project Report
On

__________________Quiz Application______________

SUBMITTED BY-
Tamboli Faijan Amir
( Roll No. 57)
(Exam Seat No. )

UNDER THE GUIDANCE OF

Prof.Dr.Shubhangi Potdar mam

SAVITRIBAI PHULE PUNE UNIVERSITY


MASTER IN COMPUTER APPLICATION

Dr. Vithalrao Vikhe Patil Foundation’s


INSTITUTE OF BUSINESS MANAGEMENT AND RURAL
DEVELOPMENT (IBMRD) AHMEDNAGAR

For the year


2023-2024
CERTIFICATE Date:

This is to certify that Mr. Faijan Amir Tamboli


students of Institute of Business Management And Rural
Development have successfully completed the Mini project
work as prescribed by the Savitribai Phule Pune University,
Pune in the partial fulfillment of the requirement of First
Year, Master of
Computer Application Program for the academic year 2023-2024.
The Project Work titled as “ Quiz Application ”

Dr Shubhangi Potdar Dr Shubhangi Potdar

Project Guide Head Of Dept

External Examiner Internal Examiner


ACKNOWLEDGEMENT

At every outset we express my gratitude to


almighty lord for showering his grace and blessings
upon me to complete this project.

Although our name appears on the cover of this


book, many people had contributed in some form or the
other form to this project Development. We could not
do this project without the assistance or support of each
of the following we thank you all.

We wish to place on my record my deep sense of


gratitude to my project guide, for his constant
motivation and valuable help through the project work.
Express my gratitude to Dr. Sanjay
Dharmadhikari.(Director) and Dr. Potdar
Shubhangi (H.O.D) of Institute of Business
Management And Rural Development for her valuable
suggestions and advices throughout the MCA course.
Wealso extend my thanks to other faculties for their
Cooperation during my Course.

Finally, we would like to thank my friends for their cooperation to


complete this project.

Mr . Faijan Amir Tamboli


DECLARATION

We hereby declare that the project work entitled,“


Quiz Application ” submitted under the guidance of
Prof.Shubhangi Potdar is our original work completed
under thefour walls of our institute.

The Report submitted is our own work and has not


been duplicated from any other source. We shall be
responsible for any unpleasure moment/situation.

Mr. Faijan Amir Tamboli


Table of content

CHAPTER 1 : INTRODUCTION
1.1 Aim and Objective
1.2 Purpose of the System
1.3 Scope Of the System
1.4 Description

CHAPTER 2 : Survey of Technologies


2.1 Existing System
2.2 Proposed System
2.3 Requirement Analysis :
2.3.1 Hardware Requirements
2.3.2 Software Requirements

CHAPTER 3 : Requirement and Analysis


3.1 Conceptual diagrams
3.1.1 Waterfall Model
3.1.2 Flow Chart
3.2 ER Diagram
3.3 UML Diagrams
3.3.1 Use Case Diagram
3.3.2 Flow Chart diagram
3.4 Activity diagram
3.5 Sequence diagram

Chapter 4: System Design


4.1 User Interface

Chapter 5: Implementation and Testing


5.1 Coding Details and Code Efficiency
5.1.1CodingDetails
5.2 TestingApproach
5.2.1UnitTesting
5.2.2IntegrationTesting

Chapter 6 : Conclusion
6.1 Conclusion
6.1.1SignificanceoftheSystem
6.2 LimitationsoftheSystem
6.3 FutureScopeoftheProject
Chapter 1
Introduction
1.1 Aim and Objective:

Aim:
“Our aim is to develop an application for the users in which a user can attempt any number of
quizzes related to his/her choice.”

Objective:
The main objective of “Quiz Application” is to facilitate a user friendly environment for all users
and reduces the manual effort. In past days quiz is conducted manually but in further resolution
of the technology we are able to generate the score and pose the queries automatically. The
functional requirements include creating users that are going to participate in the quiz, automatic
score and report generation and administrative tasks like add, delete, update for admin privilege
users. In this application, all the permissions lies with the administrator i.e., specifying the details
of the quiz with checking result will show to interviewee or not, addition of question and
answers, marks for each question, Set timer for each quiz and generate report with score for each
quiz.

1.2 Purpose :

This web application provides facility to Play online quiz and practice Grammar,
Aptitude, and G.K. It provides a good platform, where a student not only judges there
knowledge/skill but also they can improve knowledge/skill at the same time

1.3 Scope :

The Scope of this project is very broad in terms of gaining knowledge and sharing
knowledge among world.
Few points are:-
• Can be used anywhere any time as it is a web based application.
• This application will be used in educational institutions as well as in corporate
world.
1.4 Description :
Firstly, we have to make interfaces for Home Page, Login Page, Questions Attempting forum,
Result Page, & Profile of user. These all pages have connectivity with the server and database.
So, that it can work properly. Currently, there are websites which only provide limited number of
quizzes related to different domain. Many websites do not have a single platform for quizzes
related to technical, G.K, Aptitude, Games, etc. And there is not a website where the users can
upload his/her questions and answers for the others. We have to develop an application which
can resolve all of the above problems. By this user can gain knowledge, can solve his/her query and
spread his/her knowledge among the world.
Chapter 2

2.1 Existing System:

There are so many Projects are available on Quiz Application . There are as follow –

➢ Quiz Up
Combining trivia and a social network, Quiz Up invites you to choose from more than 1,200
topics, take part in challenges and illustrated quizzes and post about your interests. You can
play against friends or go up against millions of the platform‟s users.

➢ Heads Up!
Suitable for all the family, this game sees players guess words/names/titles, which may
include celebrities, characters, movies, books and songs, which are described or acted out by
their friends. Just think of it as charades for the smartphone generation.

➢ Who Wants To Be a Millionaire


The classic game which captured the hearts of audiences worldwide is now available on mobile,
meaning you can relive the nail-biting build up as you bid to become a (virtual) millionaire.
Features include 50:50, ask the Audience and Ask the Expert. You can play against friends and
family too.

➢ Popcorn Trivia
Test out your knowledge of the silver screen with this addictive movie trivia app. Questions,
based on classic films, blockbusters and fan favorites, span picture rounds and multiple choices.
Each question is followed with an interesting fact. Play solo or against others.

2.2 Proposed System:


Unlike the other Application where you need to make account for every quiz you want to play,
but using this application, you just have to login by user name and password and then you will
get access to all quizzes from it.
The proposed system is an application will help in improving the knowledge and accuracy.
2.3 Requirement Analysis:
➢ Hardware Requirement :
Most current Computers and Laptop have enough specifications to be used to create an
Application. The most important specification to check on the computer would be the size of
the RAM, which should be over 2 GB, more is better. This will ensure that the computer runs
quickly and smoothly, even with heavier programs. The computer should have a keyboard and
mouse attached and working as well.

S.NO NAME HARDWARE

1. Processor Intel dual core (32 bit)

2. RAM 2 GB

3. Processor Speed 2 GHz

➢ Software Requirement:
Aside from a Computer and internet connection, most of the tools you need to build an
Application are Software Program. Some of which may already be on your computer.
S.NO NAME SOFTWARE

1. Platform Windows 7

2. Language Used Core Java

3. Database tool MySQL


Chapter 3

3.1 Waterfall Process model

The Classical Life Cycle or waterfall Process Model was the first process model to present a
sequential framework, describing basic stages that are mandatory for a successful software
development model. It formed the basis for most software development standards and consists
of the following phases: Requirement analysis, design, coding, testing, and maintenance.

Advantages of waterfall model:

• Simple goal.
• Simple to understand and use.
• Clearly defined stages.
• Easy to arrange tasks.
• Process and result are well documented.
• Customers / end users already know about it.
• Easy to manage.

Disadvantage of Waterfall model:


Rigid design and inflexible procedure.

• Waterfall model faced “Inflexible point solution” which meant even small amendments
in the design were difficult to incorporate later design phase.
• As the requirement were froze before moving to the design phase, using the incomplete
set of requirement, a complete design was worked amendments In case of a large
project, completing a phase and then moving back to reconstruct the same phase,
incurred a large overhead.
• Once a phase is done, it is not repeated again that is movement in the waterfall goes one
to the next and the vice versa is not supported, deadlines are difficult to meet I case of
large projects.
Implementation

Fig 1 : Waterfall Model


3.2 ER Diagram :

Figure 2: ER Diagram
3.3 UML Diagrams
3.3.1 Use Case Diagram :
To model a system, the most important aspect is to capture the dynamic behavior. Dynamic
behavior means the behavior of the system when it is running/operating. Only static behavior
is not sufficient to model a system; rather dynamic behavior is more important than static
behavior. In UML, there are five diagrams available to model the dynamic nature and use case
diagrams are one of them. A use case diagram is a graphical depiction of a user's possible
interactions with a system. A use case diagram shows various use cases and different types of
users the system has and will often be accompanied by other types of diagrams as well. A use
case diagram is used to represent the dynamic behavior of a system. It encapsulates the
system‟s functionality by incorporating use cases, actors and their relationships. Use case
diagrams consist of actors, use cases and their relationships. The diagram is used to model the
system/subsystem of an application. A single use case diagram captures a particular
functionality of a system. Hence to model the entire system, a number of use case diagrams are
used.

The purpose of a use case diagram is to capture the dynamic aspect of a system.

● Purpose The main purpose of use case diagrams is to portray the dynamic aspect of a
system.

Following are some purposes of a use case diagram:

➔ It represents the interaction between the actors.

➔ It depicts the external view of the system.

➔ It gathers the system‟s needs.

➔ It recognizes the internal as well as external factors that influence the system.

Use case diagrams are used to gather the requirements of a system including internal and
external influences. These requirements are mostly design requirements. Hence, when a system
is analyzed to gather its functionalities, use cases are prepared and actors are identified. When
the initial task is complete, use case diagrams are modelled to present the outside view.

Benefits of Use Case Diagrams are as follows:

● Used to gather the requirements of a system.

● Used to get an outside view of a system.


● Identify the external and internal factors influencing the system.

● Show the interaction among the requirements are actors.

Figure 3 : Use case Diagram


3.3.2 Flow Chart :

Figure 4 : Flow Chart


3.4 Activity diagram
Activity diagram is another important diagram in UML to describe the dynamic aspects of
the system. Activity diagram is basically a flowchart to represent the flow from one activity to
another activity. The activity can be described as an operation of the system. An activity
diagram is a behavioral diagram i.e. it depicts the behavior of a system. An activity diagram
portrays the control flow from a start point to a finish point showing the various decision paths
that exist while the activity is being 28 executed. An activity diagram shows business and
software processes as a progression of actions. These actions can be carried out by people,
software components or computers. Activity diagrams are used to describe business processes
and use cases as well as to document the implementation of system processes

Benefits of Activity Diagrams are as follows:

● Demonstrate the logic of an algorithm.

● Describe the steps performed in a UML use case.

● Illustrate a business process or workflow between users and the system.

● Simplify and improve any process by clarifying complicated use cases.

● Model software architecture elements, such as method, function, and operation.


Figure 4.1 : Activity Diagram For Submit Quiz
Figure 4.2 : Activity Diagram For Play quiz
3.5 Sequence Diagram :
A sequence diagram is a type of interaction diagram because it describes how and in what order
a group of objects works together. These diagrams are used by software developers and
business professionals to understand requirements for a new system or to document an existing
process. A sequence diagram is the most commonly used interaction diagram. An interaction
diagram is used to show the interactive behaviour of a system.

Benefits of Sequence diagrams are as follows:

● To capture the dynamic behaviour of a system.

● To describe the message flow in the system.

● To describe the structural organization of the objects.

● To describe the interaction among objects.

● Represent the details of a UML use case.

● Model the logic of a sophisticated procedure, function, or operation.

● See how objects and components interact with each other to complete a process.

● Plan and understand the detailed functionality of an existing or future scenario.


Figure 5.1 : Sequence diagram For Play Quiz
Figure 5.2 : Sequence Diagram for Submit Question
Figure 5.3 : Sequence Diagram For Logout
Chapter 4

4.1 User Interface :


Chapter 5

5.1 Coding Details and Code Efficiency

5.1.1 Coding Details

Login :
package quiz.application;

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

public class Login extends JFrame implements ActionListener{

JButton rules, back;

JTextField tfname;

Login() {

getContentPane().setBackground(Color.WHITE);

setLayout(null);

ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/login.jpeg"));

JLabel image = new JLabel(i1);

image.setBounds(0, 0, 600, 500);

add(image);

JLabel heading = new JLabel("Simple Minds");

heading.setBounds(750, 60, 300, 45);

heading.setFont(new Font("Viner Hand ITC", Font.BOLD, 40));

heading.setForeground(new Color(30, 144, 254));

add(heading);

JLabel name = new JLabel("Enter your name");

name.setBounds(810, 150, 300, 20);

name.setFont(new Font("Mongolian Baiti", Font.BOLD, 18));

name.setForeground(new Color(30, 144, 254));

add(name);
tfname = new JTextField();

tfname.setBounds(735, 200, 300, 25);

tfname.setFont(new Font("Times New Roman", Font.BOLD, 20));

add(tfname);

rules = new JButton("Rules");

rules.setBounds(735, 270, 120, 25);

rules.setBackground(new Color(30, 144, 254));

rules.setForeground(Color.WHITE);

rules.addActionListener(this);

add(rules);

back = new JButton("Back");

back.setBounds(915, 270, 120, 25);

back.setBackground(new Color(30, 144, 254));

back.setForeground(Color.WHITE);

back.addActionListener(this);

add(back);

setSize(1200, 500);

setLocation(200, 150);

setVisible(true);

public void actionPerformed(ActionEvent ae) {

if (ae.getSource() == rules) {

String name = tfname.getText();

setVisible(false);

new Rules(name);

} else if (ae.getSource() == back) {

setVisible(false);

public static void main(String[] args) {

new Login();

}
Rules :
package quiz.application;

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

public class Rules extends JFrame implements ActionListener{

String name;

JButton start, back;

Rules(String name) {

this.name = name;

getContentPane().setBackground(Color.WHITE);

setLayout(null);

JLabel heading = new JLabel("Welcome " + name + " to Simple Minds");

heading.setBounds(50, 20, 700, 30);

heading.setFont(new Font("Viner Hand ITC", Font.BOLD, 28));

heading.setForeground(new Color(30, 144, 254));

add(heading);

JLabel rules = new JLabel();

rules.setBounds(20, 90, 700, 350);

rules.setFont(new Font("Tahoma", Font.PLAIN, 16));

rules.setText(

"<html>"+

"1. Users may need to register with accurate information to participate in the quiz." + "<br><br>" +

"2. Multiple-choice questions will be included in the quiz." + "<br><br>" +

"3. For every correct answer you will get 10 points." + "<br><br>" +

"4. Check you have selected the answer." + "<br><br>" +

"5. You Have 15 Second to choose an Option." + "<br><br>" +

"6. If You not Submit the quiz, it will be automatically Submited." + "<br><br>" +

"7. Cheating, use of external resources, or any form of dishonesty during the quiz is strictly prohibited." + "<br><br>" +

"8. Best Of Luck !" + "<br><br>" +

"<html>"
);

add(rules);

back = new JButton("Back");

back.setBounds(250, 500, 100, 30);

back.setBackground(new Color(30, 144, 254));

back.setForeground(Color.WHITE);

back.addActionListener(this);

add(back);

start = new JButton("Start");

start.setBounds(400, 500, 100, 30);

start.setBackground(new Color(30, 144, 254));

start.setForeground(Color.WHITE);

start.addActionListener(this);

add(start);

setSize(800, 650);

setLocation(350, 100);

setVisible(true);

public void actionPerformed(ActionEvent ae) {

if (ae.getSource() == start) {

setVisible(false);

new Quiz(name);

} else {

setVisible(false);

new Login();

public static void main(String[] args) {

new Rules("User");

}
Quiz :

package quiz.application;

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

public class Quiz extends JFrame implements ActionListener {

String questions[][] = new String[10][5];

String answers[][] = new String[10][2];

String useranswers[][] = new String[10][1];

JLabel qno, question;

JRadioButton opt1, opt2, opt3, opt4;

ButtonGroup groupoptions;

JButton next, submit, lifeline;

public static int timer = 15;

public static int ans_given = 0;

public static int count = 0;

public static int score = 0;

String name;

Quiz(String name) {

this.name = name;

setBounds(50, 0, 1440, 850);

getContentPane().setBackground(Color.WHITE);

setLayout(null);

ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/quiz.jpg"));

JLabel image = new JLabel(i1);

image.setBounds(0, 0, 1440, 392);

add(image);

qno = new JLabel();

qno.setBounds(100, 450, 50, 30);

qno.setFont(new Font("Tahoma", Font.PLAIN, 24));

add(qno);
question = new JLabel();

question.setBounds(150, 450, 900, 30);

question.setFont(new Font("Tahoma", Font.PLAIN, 24));

add(question);

questions[0][0] = "Which is used to find and fix bugs in the Java programs.?";

questions[0][1] = "JVM";

questions[0][2] = "JDB";

questions[0][3] = "JDK";

questions[0][4] = "JRE";

questions[1][0] = "What is the return type of the hashCode() method in the Object class?";

questions[1][1] = "int";

questions[1][2] = "Object";

questions[1][3] = "long";

questions[1][4] = "void";

questions[2][0] = "Which package contains the Random class?";

questions[2][1] = "java.util package";

questions[2][2] = "java.lang package";

questions[2][3] = "java.awt package";

questions[2][4] = "java.io package";

questions[3][0] = "An interface with no fields or methods is known as?";

questions[3][1] = "Runnable Interface";

questions[3][2] = "Abstract Interface";

questions[3][3] = "Marker Interface";

questions[3][4] = "CharSequence Interface";

questions[4][0] = "In which memory a String is stored, when we create a string using new operator?";

questions[4][1] = "Stack";

questions[4][2] = "String memory";

questions[4][3] = "Random storage space";

questions[4][4] = "Heap memory";

questions[5][0] = "Which of the following is a marker interface?";

questions[5][1] = "Runnable interface";


questions[5][2] = "Remote interface";

questions[5][3] = "Readable interface";

questions[5][4] = "Result interface";

questions[6][0] = "Which keyword is used for accessing the features of a package?";

questions[6][1] = "import";

questions[6][2] = "package";

questions[6][3] = "extends";

questions[6][4] = "export";

questions[7][0] = "In java, jar stands for?";

questions[7][1] = "Java Archive Runner";

questions[7][2] = "Java Archive";

questions[7][3] = "Java Application Resource";

questions[7][4] = "Java Application Runner";

questions[8][0] = "Which of the following is a mutable class in java?";

questions[8][1] = "java.lang.StringBuilder";

questions[8][2] = "java.lang.Short";

questions[8][3] = "java.lang.Byte";

questions[8][4] = "java.lang.String";

questions[9][0] = "Which of the following option leads to the portability and security of Java?";

questions[9][1] = "Bytecode is executed by JVM";

questions[9][2] = "The applet makes the Java code secure and portable";

questions[9][3] = "Use of exception handling";

questions[9][4] = "Dynamic binding between objects";

answers[0][1] = "JDB";

answers[1][1] = "int";

answers[2][1] = "java.util package";

answers[3][1] = "Marker Interface";

answers[4][1] = "Heap memory";

answers[5][1] = "Remote interface";

answers[6][1] = "import";

answers[7][1] = "Java Archive";

answers[8][1] = "java.lang.StringBuilder";

answers[9][1] = "Bytecode is executed by JVM";


opt1 = new JRadioButton();

opt1.setBounds(170, 520, 700, 30);

opt1.setBackground(Color.WHITE);

opt1.setFont(new Font("Dialog", Font.PLAIN, 20));

add(opt1);

opt2 = new JRadioButton();

opt2.setBounds(170, 560, 700, 30);

opt2.setBackground(Color.WHITE);

opt2.setFont(new Font("Dialog", Font.PLAIN, 20));

add(opt2);

opt3 = new JRadioButton();

opt3.setBounds(170, 600, 700, 30);

opt3.setBackground(Color.WHITE);

opt3.setFont(new Font("Dialog", Font.PLAIN, 20));

add(opt3);

opt4 = new JRadioButton();

opt4.setBounds(170, 640, 700, 30);

opt4.setBackground(Color.WHITE);

opt4.setFont(new Font("Dialog", Font.PLAIN, 20));

add(opt4);

groupoptions = new ButtonGroup();

groupoptions.add(opt1);

groupoptions.add(opt2);

groupoptions.add(opt3);

groupoptions.add(opt4);

next = new JButton("Next");

next.setBounds(1100, 550, 200, 40);

next.setFont(new Font("Tahoma", Font.PLAIN, 22));

next.setBackground(new Color(30, 144, 255));

next.setForeground(Color.WHITE);

next.addActionListener(this);

add(next);
lifeline = new JButton("50-50 Lifeline");

lifeline.setBounds(1100, 630, 200, 40);

lifeline.setFont(new Font("Tahoma", Font.PLAIN, 22));

lifeline.setBackground(new Color(30, 144, 255));

lifeline.setForeground(Color.WHITE);

lifeline.addActionListener(this);

add(lifeline);

submit = new JButton("Submit");

submit.setBounds(1100, 710, 200, 40);

submit.setFont(new Font("Tahoma", Font.PLAIN, 22));

submit.setBackground(new Color(30, 144, 255));

submit.setForeground(Color.WHITE);

submit.addActionListener(this);

submit.setEnabled(false);

add(submit);

start(count);

setVisible(true);

public void actionPerformed(ActionEvent ae) {

if (ae.getSource() == next) {

repaint();

opt1.setEnabled(true);

opt2.setEnabled(true);

opt3.setEnabled(true);

opt4.setEnabled(true);

ans_given = 1;

if (groupoptions.getSelection() == null) {

useranswers[count][0] = "";

} else {

useranswers[count][0] = groupoptions.getSelection().getActionCommand();

}
if (count == 8) {

next.setEnabled(false);

submit.setEnabled(true);

count++;

start(count);

} else if (ae.getSource() == lifeline) {

if (count == 2 || count == 4 || count == 6 || count == 8 || count == 9) {

opt2.setEnabled(false);

opt3.setEnabled(false);

} else {

opt1.setEnabled(false);

opt4.setEnabled(false);

lifeline.setEnabled(false);

} else if (ae.getSource() == submit) {

ans_given = 1;

if (groupoptions.getSelection() == null) {

useranswers[count][0] = "";

} else {

useranswers[count][0] = groupoptions.getSelection().getActionCommand();

for (int i = 0; i < useranswers.length; i++) {

if (useranswers[i][0].equals(answers[i][1])) {

score += 10;

} else {

score += 0;

setVisible(false);

new Score(name, score);

public void paint(Graphics g) {

super.paint(g);
String time = "Time left - " + timer + " seconds"; // 15

g.setColor(Color.RED);

g.setFont(new Font("Tahoma", Font.BOLD, 25));

if (timer > 0) {

g.drawString(time, 1100, 500);

} else {

g.drawString("Times up!!", 1100, 500);

timer--; // 14

try {

Thread.sleep(1000);

repaint();

} catch (Exception e) {

e.printStackTrace();

if (ans_given == 1) {

ans_given = 0;

timer = 15;

} else if (timer < 0) {

timer = 15;

opt1.setEnabled(true);

opt2.setEnabled(true);

opt3.setEnabled(true);

opt4.setEnabled(true);

if (count == 8) {

next.setEnabled(false);

submit.setEnabled(true);

if (count == 9) { // submit button

if (groupoptions.getSelection() == null) {

useranswers[count][0] = "";

} else {
useranswers[count][0] = groupoptions.getSelection().getActionCommand();

for (int i = 0; i < useranswers.length; i++) {

if (useranswers[i][0].equals(answers[i][1])) {

score += 10;

} else {

score += 0;

setVisible(false);

new Score(name, score);

} else { // next button

if (groupoptions.getSelection() == null) {

useranswers[count][0] = "";

} else {

useranswers[count][0] = groupoptions.getSelection().getActionCommand();

count++; // 0 // 1

start(count);

public void start(int count) {

qno.setText("" + (count + 1) + ". ");

question.setText(questions[count][0]);

opt1.setText(questions[count][1]);

opt1.setActionCommand(questions[count][1]);

opt2.setText(questions[count][2]);

opt2.setActionCommand(questions[count][2]);

opt3.setText(questions[count][3]);

opt3.setActionCommand(questions[count][3]);

opt4.setText(questions[count][4]);
opt4.setActionCommand(questions[count][4]);

groupoptions.clearSelection();

public static void main(String[] args) {

new Quiz("User");

Score :

package quiz.application;

import java.awt.*;

import javax.swing.*;

import java.awt.event.*;

public class Score extends JFrame implements ActionListener {

Score(String name, int score) {

setBounds(400, 150, 750, 550);

getContentPane().setBackground(Color.WHITE);

setLayout(null);

ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/score.png"));

Image i2 = i1.getImage().getScaledInstance(300, 250, Image.SCALE_DEFAULT);

ImageIcon i3 = new ImageIcon(i2);

JLabel image = new JLabel(i3);

image.setBounds(0, 200, 300, 250);

add(image);
JLabel heading = new JLabel("Thankyou " + name + " for playing Simple Minds");

heading.setBounds(45, 30, 700, 30);

heading.setFont(new Font("Tahoma", Font.PLAIN, 26));

add(heading);

JLabel lblscore = new JLabel("Your score is " + score);

lblscore.setBounds(350, 200, 300, 30);

lblscore.setFont(new Font("Tahoma", Font.PLAIN, 26));

add(lblscore);

JButton submit = new JButton("Play Again");

submit.setBounds(380, 270, 120, 30);

submit.setBackground(new Color(30, 144, 255));

submit.setForeground(Color.WHITE);

submit.addActionListener(this);

add(submit);

setVisible(true);

public void actionPerformed(ActionEvent ae) {

setVisible(false);

new Login();

public static void main(String[] args) {

new Score("User", 0);

5.2 Testing Approach


Software testing is a process which is used to measure the quality of software
developed. It is also a process of uncovering errors in a program and makes it a feasible task.
It is useful process of executing program with the intent of finding bugs. In order to prove
that a piece of software works, the software must be tested to determine if the requirements
of the application are met. There are several different types used throughout the development
process. These are various types of testing. Some of which are mentioned below :

Component Testing : Where each and every components related to the software project is
tested.

System Testing : The testing implemented on overall software project after component
integration is system testing.

Acceptance Testing : It is performed after software installation in user environment with data
supplied by customers.

5.2.1 Unit Testing


The first test in the development process is the unit test. Unit testing is a level of
software testing where individual units or componennts of a software are tested. The purpose
is to to validate that each unit of the software perforns ass designed. A unit is the smallest
testable part of aany softare. It usually has one or a few inputs ad ussaully a single output.
The source code is normally divided into modules, which in turn are divided into smaller unit
called units. These units have specific behaviour. The test done on these units of code is
called unit test.

Unit test depends upon the language on which the project is developed. Unit tests
ensur that each unique path of the project performs accurately to the documented
specifications and contains clearly defined inputa and expected results. Unit tests are
typically written and run by software developers to ensure that code meets its design and
behaves as intended.

Here are some of the objectives of unnit testing :

• To verify the correctness of code.


• To fix bugs early in the development cycle and save costs.
• To help developers to understand the testing code base and enable them to make
changes quickly.
• To help the code reuse.
• To isolate a section of code.
• To test every unction and procedure.
• To learn what funictonally is provided by a unnit.
• It improves design and allows better refrractoring of code and makes the integration
simple.
• It helps find problems and resolve them before further testing so they won’t impact
other bits of code.
• It makes the process of debuggung easier.

5.2.2 Integrated Testing


Integration testing is a level of software testing where individual units are combined
and tested to verify if they are working properly. Integration testing carries a lot of
significance as it helps tester in determining the effectiveness as well as the functionality of
he software.

Integration testing is critical to ensure the functional correctness of the integrated


ssystem. Integration testing is often the most time consumng and expensive part of testing.
Testing peformed to expose defects in the interfaces and in the interactionns between
integrated components or sysstems.
Chapter 6
6.1 Conclusion :
Quiz application provides facility to attempt quiz anywhere and anytime. It save time since
user does need to wait for result. So student/user cannot wait for the result. All Student/ user
get extra knowledge and skills. Administrator has a privilege to put as much as question in
given Quiz in application. User can register, log-in to atempt Quiz. If user forget thier
password then he/ she can reset password with the help of Forgot Pasword option. There is
instruction page for students o get imformation about quiz like number of question, given
time etc. After that student get the result of quiz. so, student cannot wait for result. also admin
is resposible to add, delete and update quetion in the system. also he can view result of all
students.
It hass been a great pleasure for me to work on this exciting and challenging project.
This project proved good for me as it provided practical knowledge of programming in JAVA
and MYSQL server and also about all handling procedure related with Quiz System. It also
provides knowledge about the latest technology used in developing application and server
technology tha will be great demand in future. This will provide better opportunities and
guidance in future in developing projects independently. This Quiz Application can be
efficiently used by any students and Educational platforms. During the course of this
assignment I have gone through many obstacle which made me to research and aalso increase
mu knowledge.
At last it can be concluded that the “Quiz Application” was the real learning
experience. The project has been made as per as the given specification. The sytem has been
made as userfriendly as possible.

6.1.1 Significance of the system

• The system is easy to use as it is user friendly.


• The working of the system is in organized form.
• It provides faster and accurate prescription procesing.
• The system is kept simple and can be easily used by users.
• Quiz can be given without an instructor, which saves money and time.
• A larger number of participants, with instant results of your quiz.
6.2 Limitations of the System :

• The admin needs to be regularly be in contact with other users for any update in the
user’s information.
• We want to implement a concept where user itself can add question for others.
• We want to implement a concept where the user can solve any query related to each
question at that time only.
• We also want to implement a concept where every user can see profile of other user.

6.3 Future Scope of the Project :

• The Scope of this project is very broad in terms of gaining knowledge and sharing
knowledge among world.
• Can be used anywhere any time as it is a application.
• This application will be used in educational institutions as well as in corporate world.

You might also like