Quizz Final (1) Merged
Quizz Final (1) Merged
The project: “Quiz Application” is a collection of number of different types of quizzes like
technical, games, sports, etc. A user can access/play all of the quiz and can attempt any ofthe
one. There will be limited number of questions and for each correct answer user will get a
credit score. User can see answers as well as can ask a query related to it. There are many quiz
applications available currently on internet. But there are few Which provide better
understanding between users and the application like, providing proper answers, user query
solving, uploading user questions as well as answer to it, etc.
To develop a user friendly quiz application which will contain : Numbers of quiz , Answers to
every question, Query solving regarding any question, Uploading of user question and answer,
and to improve the knowledge level of users. To develop an application which will contain
solution to the above problems. By this application the user will come to know about his/her
level and can learn additional knowledge. Also by this application a user can expand his/her
knowledge among the world.
i
CONTENTS
CHAPTER 1
INTRODUCTION
1.1 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|Page
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
2|Page
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
CHAPTER 2
LITERATURE SURVEY
Web in simple terms means a network of Internet servers that are ready to support some
formatted documents and can be accessed by a web browser. About these formatted documents
these are formatted in HTML (Hypertext mark-up language). Not these formatted documents
create their links to their type but they also support links to some documents including video,
graphics and audio files. Terms Web and Internet are interchangeably used but they are not
same. While Internet refers to global network of servers that makes sharing of information,
Web is the collection of information being accessed via Internet. Also, we can say that Web is
a service and Internet is an infrastructure where web is a service on top of it.
Alternatively, we can say Web is just a portion of the Internet. Particularly whenever a client
surfing web makes a request to web server, it first find resources and then sends some return
response in HTML to the browser and a web browser know how to display them to client. Web
pages are the documents written in HTML which provides meaning and some structure to any
web content and collection of these web pages is called a website which consists of static files.
A web application however is same as a website but with dynamic functionality like where
user can manipulate the restricted data. A website seems to be too informational while a web
application is interactive. User spend more of its time reading, listening or viewing a website
but in a web application like social media applications where user spend a lot of interaction or
banking application that performs 13 transactions on customer’s input. Authentication can also
be a point of difference between website and web application.
Since in a web application, interaction of user is high and manipulation of data is there,
therefore user accounts must be secured in order to prevent unauthorized access and any
leakage of sensitive data. Most of the web application requires authentication but for the
informational websites it is not obligatory. An example for this can be that while reading any
news or article you don’t need to go through any authentication process but to comment on it
that includes interaction you have to go through a log in process. HTTP which is Hypertext
Transfer Protocol is a set of protocols that is used by clients and servers to communicate on
web. to deliver data which includes HTML files, image files, query results, etc. on the World
3|Page
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
Wide Web. HTTP is the foundation of data communication for the World Wide Web since
1990. HTTP represents Hyper Text Transfer Protocol.
WWW is about correspondence between web customers and servers. Communication between
customer PCs and web servers is finished by sending HTTP Requests and accepting HTTP
Responses A client (a program or browser) sends a HTTP request to the web .A web server
gets the solicitation .The server runs an application to process the request . The server restores
an HTTP response.The client gets the response.
HTTP is a simple and powerful protocol because: Connectionless: 14 An HTTP client which
might be a browser will initiate an HTTP request to the server. The server processes the request
and sends a response back after which client disconnect the connection. In this way we can say
that client and server only know about each other only during the current request is initiated
and response is received. For further requests new connection is made like client and server
are new to each other .
Media Independent: It means, any type of data can be sent by HTTP as long as both the client
and the server know how to handle the data content. Stateless Protocol: By Stateless Protocols
we mean the type of network protocols in which Client send request to the server and server
response back according to current state.
For the execution of server response, it does not require the server to retain session information
or a status about each other. Some examples of Stateless Protocol are HTTP (Hypertext
Transfer Protocol), UDP (User Datagram Protocol), DNS (Domain Name System) As HTTP
is connectionless and it is because HTTP is a stateless protocol. Each command is executed
independently, without any knowledge of the commands that came before it. The server and
client are known about each other only during a particular request.
After execution of that request/response both of them forget each other. technology which
resides on the server side and is used to create web application. Because of the Java language
it is robust and scalable. It is also an API which provides many different classes as well as
interfaces.
The most important feature of servlet is that it extends capabilities of the server thus creating
dynamic web pages. They are also able to handle complex requests that is obtained from the
web server. Finally, the web browser handles the dynamically-generated HTML page inside
the HTTP response and we see the output exactly as if it was a static page.
4|Page
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
CHAPTER 3
SOFTWARE AND HARDWARE REQUIREMENT
3.1 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.
• Operating System Front End Back End Server Documentation : Windows 10
• Frontend Software: Java NetBeans 8.2 : JDK 8
• Backend Software: MySQL
1. Platform Windows 7
2. RAM 2 GB
5|Page
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
CHAPTER 4
SYSTEM DESIGN
This phase, a logical system is built which fulfils the given requirements. Design phase of
software development deals with transforming the clients's requirements into a logically
working system. Normally, design is performed in the following in the following two steps:
6|Page
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
interaction, and web based technologies for browser-based interaction. The presentation tier
displays information related to such services as browsing, merchandise, purchasing, and cart
contents.
4.1.2 Logic tier : The logic tier is pulled out from the presentation tier and, as its on layer it
controls an application functionalities by performing detailed processing Logic tier mission
critical business problems are solved. The component that makes up this layer can exist on
server machine, to assist in resource sharing. These components can be used to enforce business
rules, such as business algorithms and legal or governmental regulations, and data rules which
are designed to keep the data structures consistent within either specific or multiple databases.
4.1.3 Data tier : This tier consist of data base server, is the actual DBMS access layer .It can
be accessed through the business services layer and on occasion by the user services layer.
Here information is stored and retrieved. This tier keeps data natural and independent from
application server or business logic. Giving data is on tier also improves scalability and
performance This layer consist of data access component to aid in resources sharing and to
allow clients to be configured without installing the DBMS libraries and ODBC
drivers on each client.
7|Page
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
CHAPTER 5
IMPLEMENTATION
In implementation we start with the actual execution of the software application with the design
we have made. Implementation is done before we start with the coding of the software product
Implementation includes writing codes with the design in hand. Implementation is the process
of having systems personnel check out and put new equipment into use, train users, install the
new application depending on the size of the organization that will be involved in:
5.1 ALGORITHM
Login page:
package quiz.application;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
Login() {
getContentPane().setBackground(Color.WHITE);
setLayout(null);
setSize(1200, 500);
setLocation(200, 150);
setVisible(true);
}
9|Page
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
String name;
Quiz(String name) {
this.name = name;
setBounds(50, 0, 1440, 850);
getContentPane().setBackground(Color.WHITE);
setLayout(null);
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";
11 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
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[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[6][2] = "package";
questions[6][3] = "extends";
questions[6][4] = "export";
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";
13 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
start(count);
setVisible(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();
}
16 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
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();
17 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
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();
}
if (groupoptions.getSelection() == null) {
useranswers[count][0] = "";
} else {
useranswers[count][0] = groupoptions.getSelection().getActionCommand();
}
count++; // 0 // 1
start(count);
}
}
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();
}
}
Rules Page:
package quiz.application;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
String name;
JButton start, back;
Rules(String name) {
this.name = name;
getContentPane().setBackground(Color.WHITE);
setLayout(null);
"3. You may have lot of options in life but here all the questions are compulsory" +
"<br><br>" +
"4. Crying is allowed but please do so quietly." + "<br><br>" +
"5. Only a fool asks and a wise answers (Be wise, not otherwise)" + "<br><br>" +
"6. Do not get nervous if your friend is answering more questions, may be he/she is
doing Jai Mata Di" + "<br><br>" +
"7. Brace yourself, this paper is not for the faint hearted" + "<br><br>" +
"8. May you know more than what John Snow knows, Good Luck" + "<br><br>" +
"<html>"
);
add(rules);
setSize(800, 650);
setLocation(350, 100);
setVisible(true);
}
setVisible(false);
new Quiz(name);
} else {
setVisible(false);
new Login();
}
}
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
22 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
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);
setVisible(true);
}
23 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
CHAPTER 6
SOFTWARE TESTING
6.1 Testing Methods
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.
26 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
27 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
CHAPTER 7
RESULTS AND SNAPSHOTS
28 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
29 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
CHAPTER 8
ADVANTAGES AND APPLICATION
Advantage:
• Convenient and accessible from anywhere with an internet connection
• Automated grading saves time and reduces human error
• Can be easily updated and changed
• Can include multimedia elements like images, audio, and video
• Can track and analyze student performance data
• Easy to administer to a large number of students at once
Application:
• Provides the searching facilities based on various factors. Such as Students, Marks,
Courses, Papers
• MCQ Quiz Application also manage the Results details online for Courses details,
Papers details, Students.
• It tracks all the information of Examinations, Results, Courses ect
• Manage the information of Examinations
• Shows the information and description of the Students, Marks
• To increase efficiency of managing the Students, Examinations
• It deals with monitoring the information and transactions of Courses.
• Manage the information of Students
• Editing, adding and updating of Records is improved which results in proper resource
management of Students data.
30 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
CHAPTER 9
CONCLUSION AND FUTURE ENHANCMENT
The Scope of this project is very broad in terms of gaining knowledge and sharing knowledge
among world. mentioned the project is on java platform which is coded in NetBeans IDE with
help HTML, CSS and JavaScript and running as web page by Apache Tomcat web server. But
this project is only for MCQ test but in the future we have plan to extended it to support
subjective type of questions with more functionality. We will add Administrative part on it
which able the system to delete test, add user, delete user and so on graphically vie the web.
This online quiz application provides facility to play 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 any category given in application. User can register, log-in, and give the test with his/her
specific id, and can see the results as well.
31 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
REFERENCES
[1] Link 1 :https://en.wikipedia.org/
[2] Link 2: https://www.javatpoint.com/
[3] Link 3: https://www.w3schools.com/
[4] Link 4: https://www.tutorialspoint.com/
32 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
33 | P a g e
Dept. of CS&E SJMIT CHITRADURGA
QUIZ APPLICATION 2023-2024
34 | P a g e
Dept. of CS&E SJMIT CHITRADURGA