0% found this document useful (0 votes)
6 views

DOC-20250606-WA0003.

The document is a project report on the development of a 'Quiz Application' submitted for the Bachelor of Computer Applications program. It outlines the project's objectives, scope, methodology, and development stages, emphasizing the application's user-friendly interface and features for knowledge improvement. The report also includes acknowledgments, a declaration of originality, and details on the tools and environment used for development.
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)
6 views

DOC-20250606-WA0003.

The document is a project report on the development of a 'Quiz Application' submitted for the Bachelor of Computer Applications program. It outlines the project's objectives, scope, methodology, and development stages, emphasizing the application's user-friendly interface and features for knowledge improvement. The report also includes acknowledgments, a declaration of originality, and details on the tools and environment used for development.
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/ 39

A

PROJECT REPORT
ON

“QUIZ APPLICATION”

Submitted in Partial Fulfillment of the Requirements


for the Fifth Semester of

BACHELOR OF COMPUTER APPLICATIONS

Submitted By: Internal Guide:


MAHIMA DHIMAN Mr.Vishwas Sharma
(Enrollment No: 20021839, Roll No :200855106134) Assistant Professor
SUKANYA BHARDWAJ BCA Dept.,SRC
(Enrollment No: 20021959, Roll No: 200855106254)

To the
DEPT. OF COMPUTER APPLICATION

1
DECLARATION

We hereby declare that the project report title “QUIZ APPLICATION ” is an


original work carried out by us under the supervision of Mr . Vishwas Sharma .
We further declare that this work has not been submitted to any other
Institute/University for the requirement of Fifth semester of Bachelor of Computer
Application.

declaration

2
Computer Applications

FORWARDING LETTER

This is to certify that the project entitled “QUIZ APPLICATION” [developed

The matter embodied in this project work has not been submitted earlier for the
award of degree or diploma.

We wish him/her all the best for the future.

Internal Guide Head – BCA Department


(Mr. Vishwas Sharma) (Mr. Nishant Rathi)

3
Acknowledgement

In performing our group project, we had to take the help and guideline of some
respected persons, who deserve our greatest gratitude. The completion of this
project gives us much Pleasure. We would like to show our gratitude Mr.
VISHWAS SHARMA SIR and for giving us a good guideline for project
throughout numerous consultations and thankful every group member. We would
also like to expand our deepest gratitude to all those who have directly and
indirectlyguided us in writing this project.

4
INDEX
Ch. 1. Introduction
1.1 Scope of the system

1.2 Project Description

1.2.1 Purpose, scope and Applicability


1.3 Assumption

1.4 Limitations & issues covered

Ch. 2. Project Category Tools & Environment


2.1 Project Category

2.2 Front end coverage


2.3 Software and Hardware requirements

Ch. 3. Project development stages


3.1 Recognition of needs
3.2 Feasibility study
3.3 System Analysis (DFD’s E-R Diagram, PERT Chart etc.)

3.4 System Development

3.5 Testing, Implementation & Maintenance

Ch. 4. Project Forms (Details)

Ch. 5. Conclusion

Ch. 6. Future Enhancement

5
Appendix

A. Bibliography

6
Introduction:- This is a simply and beautify quiz application. The application test
your knowledge and understanding in different areas. After each quiz, the user will
see the final score and you have the ability to go through the quiz result analysis to
see questions that you fail and the correct answers. The project: “Quiz Application”
is a collection of number of different types of quizzes like technical, games, sports,
etc. A user can access/play the entire quiz and can attempt any of the 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.

7
1.1 AIM & 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, Scope and Applicability:


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.

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.

Applicability: Anyone, whether a newcomer or professional, willing to learn they


can choose it. All users will have access to all subject containing sub topics Users
will receive best experience without any interruptions.

8
1.2 Description:

Firstly, we have to make interfaces for Home Page, Login Page, and
Questions Attempting for, 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.

1.3 Methodology: The programming language used for the development of the
project is JAVA.

1.4 Assumptions: We assume that the users of our Application should have a
minimal Knowledge of computer system and should have an availability of
internet. We are dependent on the sources from where we have gathered the data
and the data are

1.5 Authenticated.

1.6 Limitations and Issues covered:


Limitations: No face to face interaction between the students and teacher. User
cannot add Questions for others. Questions may take time to arrive due to slow
internet connections.

Issues covered: Students may have option to select subject that meets their level
of Knowledge and Interest. Beneficial for those users who cannot afford studying
in a class. This quiz application is free of cost.

1.7 Achievement: With the help of our Application user will get complete
knowledge of their respective subject. This application helpful for all competitive
exam like UPSC, MPSC, SSC, CDS, NDA and much more .

9
CHAPTER 2
PROJECT CATEGORY TOOLS & ENVIRONMENT

2.1 PROJECT CATEGORY: Quiz Up invites you to play a quiz application


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. Suitable
for all the science students, these quizzes in which java questions are include. Just
think of it as charades.
The classic game which captured the hearts of audiences. Features include 50:50,
ask the Audience and Ask the Expert. You can play against friends and family too.
Test out your knowledge of the silver screen with this addictive quiz application.
Questions based on java and multiple choices. Each question is followed with an
interesting fact. Play solo or against others.

Proposed System:
Unlike the websites where you need to make account for every quiz you
want to play, using this application based, you just have to login by user
name and then you willget access to all quizzes from it. The proposed
system is an application will help in improving the knowledge and
accuracy. The proposed system will be developed for Desktop
Application.

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 then you will get access to all quizzes from it. The
proposed system is an application will help in improving the knowledge
and accuracy.

10
2.2 FRONT END COVERAGE
Processes and Validation
IMAGE :1

Main Screen:
This image is the starting screen where the high score is showing and
where I can start the quiz. There are use three elements two text box and
one button. This is the main screen on quiz app.

11
12
13
2.2 Justification of Platform:
Justification means why I choose this project to make because not just for making
Project for College It is for improving my skills.

Why Netbeans : Net beans is an open-source Integrated Development


Environment (IDE) . It is used to develop applications with JAVA, PHP, C++,
HTML and many other Programming languages. The applications are developed
using modules in JAVA. Net beans can run on any operating system such as
windows, Macos, Linux etc. Apache Net beans provides editors, wizards and
templates to help you create applications in JAVA, PHP and many other languages.
The IDE simplifies the development of web, enterprise, desktop and mobile
applications that use .The JAVA and HTML5 platforms.

Advantages:
 Netbeans is very efficient in code development and java web development.

 Netbeans is a great tool to small as it is quite easy to use. its integration is great
with other tools

14
2.3 Requirement Analysis:
Quiz Contest is an application developed to conduct a quiz based on time
constraints. Quiz Contest system is accessed by entering the user name which is
added to the database. Before start of the quiz, the rules and regulations are
displayed that includes description of the time limit, number of questions to be
answered and scoring methods. Quiz is started by displaying one question with four
options each based on computer and general knowledge. if the answer is correct, 7
score is incremented by four and no negative marks for wrong answers . If the time
exceeds 20secs next question will come automatically after giving few limited
question's answer quiz application will finally direct you to the score page. Final
score will be displayed and updated in the database with username.

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(32bit)

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 Net beans

15
CHAPTER 3
PROJECT DEVELOPMENT STAGES

3.1 RECOGNITION OF NEEDS

 Students are being actively engaged in subject material.

 Quizzes can increase student’s motivation.

 Quizzes can help students to recall information and get better grades.

 Fun quizzes can reduce student’s stress.

In conclusion, ‘Quiz Application’ not only help teachers with teaching techniques
but also have a beneficial impact on students.

Increasing student’s involvement, motivation, better score and stress reduction are
several benefits that students get through fun quizzes.

3.2 Feasibility Study:

The feasibility study is an evaluation and analysis of the potential of a


proposed project which is based on extensive investigation and research to
support the process of decision making. Dependingon the results of the
initial investigation the surveyis now expanded to a more detailed
feasibility study.

16
Feasibility Study

System: Quiz Contest Date: 28-1-2023

Author: XXX Page: 1

Product

The project is a Quiz android application . It will help its users to improve
their general knowledge.

Technical Feasibility

The android application will be developed using Android Studio. The teamis
competent in that.

Social Feasibility

Some training for the users/admin are required but all users are IT literate.

Market Research

Market research says that this application would be useful for the users asit
could seamlessly help them for their lifestyle.

Economic Feasibility
The application can be developed within budget.
Alternate Solution
Could be a desktop system but that would not be as portable.

17
3.3 System Analysis :
Quiz DFD:

18
3.4 System Development:
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.

19
3.5 TESTING, IMPLEMENTATION AND MAINTENANCE
This is the phase in the software life cycle where the actual software is
implemented. The result of this phase consists of source code, together with
documentation to make the code reliable. Implementation is the action that must
follow any preliminary in order for something to actually happen. It encompasses
all the processes involved in getting new software and hardware operating
properly in its environment, including installation, configuration, and running,
testing and making necessary changes. 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.

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.

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 components of software are tested. The
purpose is to validate that each unit of the software performs ass designed. A unit
is the smallest testable part of any software. It usually has one or a few inputs ad
usually a single output. The source code is normally divided into modules, which

20
in turn are divided into smaller unit called units. These units have specific
behavior. 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
ensure that each unique path of the project performs accurately to the documented
specifications and contains clearly defined input 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 unit 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 functionally is provided by a unit.

 It improves design and allows better refactoring 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 debugging easier.

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 the software.

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


system. Integration testing is often the most time consuming and expensive part of

21
testing. Testing performed to expose defects in the interfaces and in the
interactions between integrated components or systems.

Beta Testing:
Beta testing is one of the types of user acceptance testing, which adds value to
the product as the end user (intended real user) validates the product for
functionally, usability, reality and compatibility. The main goal of user acceptance
testing is to check whether the developed software product fulfill the user
requirements.

Beta testing is performed in order to access the product by exposing it to real end
users. After that, the feedback is taken from the users and the defects detected are
fixed. Inputs provided by the end users helps inn enhancing the quality of the
product further and leads to its success. It helps he software product to provide
better user experience. This also helps in decision making to invest further in the
products or the same product for improvisation. Since Beta Testing happens at the
end user’s side, it cannot be the controlled activity.
The features of beta testing are as follows:

 Beta testing helps in providing the actual position of the quality. Beta testing
generally is done for testing software products like utilities, operating systems and
application etc.

 Beta testing focuses on the customers satisfaction.

 It helps to reduce the risk of project failure via user validations.

 Beta testing helps to get direct feedback from users.

 It helps to detect the defect and issues in the system. which is overlooked and
undetected by the team of software testers.

 Beta testing helps the user to install, test and send feedback regarding the
developed software.

22
System Requirements:

1. Minimum 512 MB of RAM

2. A processor with speeds above 1.2 GHz (any make)

3. 16 MB of storage for the app and extra for the data stored, the size of the
app increases as the number of entries are increased

4. Windows 7

5. Permission to install applications over USB and installation from


unknown sources from ‘Developer Options’

23
Applications and Technology Used:
1. Java Development Kit (JDK): Since, Android
applications require Java programming for its backend programming; it needs a
JAVA environment to support its functions, executions and syntax.

2. Xml: The front end design of the application involves xml


statements for the Relative layouts, Radio buttons, Radio Group, buttons, text
boxes and text views.

24
Description:
Using " Quiz App" source code package you can create amazing quiz app. " Quiz
App" source code package is built with latest android studio and is easy to use and
configure. With little or no coding knowledge you can easily create quiz app with
the help of this source code package.

Main Features:
1 Beautiful UI
2 Multilingual support
3 Easy to Customize/Re-skin
4 Support all Screen size
5 Set Unlimited Questions

This Quiz app package is easy to customize and use. Make most from this Quiz
app source code package. Best code with lowest price on this marketplace.

25
❖ Use Case Diagram:

❖ Entity-Relationship Diagram:

26
CODE:-
LOGIN CLASS:-
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/login1.png"));


JLabel image = new JLabel(i1);
image.setBounds(0, -100, 700, 700);
add(image);

JLabel heading = new JLabel("Quiz Game");


heading.setBounds(750, 60, 300, 45);
heading.setFont(new Font("Viner Hand ITC", Font.BOLD, 40));
heading.setForeground(Color.RED);
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(Color.RED);
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(Color.black);
rules.setForeground(Color.WHITE);
rules.addActionListener(this);
add(rules);

back = new JButton("Back");


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

27
back.setBackground(Color.BLACK);
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();
if(name.contains("cs"))

// name.setText("");
setVisible(false);
new Rules(name);
} else if (ae.getSource() == back) {
setVisible(false);
}
}

public static void main(String[] args) {


new Login();
}
}

RULES CLASS 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 Quiz Game");


heading.setBounds(50, 20, 700, 30);
heading.setFont(new Font("Viner Hand ITC", Font.BOLD, 28));
heading.setForeground(Color.RED);
add(heading);

28
JLabel rules = new JLabel();
rules.setBounds(20, 90, 700, 350);
rules.setFont(new Font("Tahoma", Font.PLAIN, 16));
rules.setText(
"<html>"+

// "1. There will be 10 questions in this quiz" + "<br><br>" +


"1. 15 seconds will be given to think the answer" + "<br><br>" +
"2. No negative marking" + "<br><br>" +
"3. Crying is allowed but please do so quietly." + "<br><br>" +
"4. If you need some help there was a 50 - 50 lifeline only a one time" + "<br><br>"
+
"5. Do not get nervous if your friend is answering more questions, may be he/she is
doing Jai Mata Di" + "<br><br>" +
"6. Brace yourself, this paper is not for the faint hearted" + "<br><br>" +
"7. Questions will be asked on the basis of java knowledge " + "<br><br>" +
"8. Thank You , Good Luck From :- Sukanya and Mahima " + "<br><br>" +

"<html>"
);
add(rules);

back = new JButton("Back");


back.setBounds(250, 500, 100, 30);
back.setBackground(Color.BLACK);
back.setForeground(Color.WHITE);
back.addActionListener(this);
add(back);

start = new JButton("Start");


start.setBounds(400, 500, 100, 30);
start.setBackground(Color.BLACK);
start.setForeground(Color.WHITE);
start.addActionListener(this);
add(start);

setSize(800, 650);
setLocation(350, 100);
setVisible(true);
}

@Override
public void actionPerformed(ActionEvent ae) {
if (ae.getSource() == start) {
setVisible(false);
Quiz quiz = new Quiz(name);
} else {
setVisible(false);
new Login();

29
}
}

public static void main(String[] args) {


Rules rules = new Rules("User");
}
}

QUIZ CLASS :-
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 1.jpg"));


JLabel image = new JLabel(i1);
image.setBounds(0, 0, 1440, 392);
add(image);

qno = new JLabel();


qno.setBounds(100, 420, 50, 30);
qno.setFont(new Font("Tahoma", Font.PLAIN, 24));
add(qno);

30
question = new JLabel();
question.setBounds(150, 420, 700, 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";

31
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, 480, 700, 20);
opt1.setBackground(Color.WHITE);
opt1.setFont(new Font("Dialog", Font.PLAIN, 20));
add(opt1);

opt2 = new JRadioButton();


opt2.setBounds(170, 510, 700, 30);
opt2.setBackground(Color.WHITE);
opt2.setFont(new Font("Dialog", Font.PLAIN, 20));
add(opt2);

opt3 = new JRadioButton();


opt3.setBounds(170, 540, 700, 30);
opt3.setBackground(Color.WHITE);
opt3.setFont(new Font("Dialog", Font.PLAIN, 20));
add(opt3);

opt4 = new JRadioButton();


opt4.setBounds(170, 570, 700, 30);
opt4.setBackground(Color.WHITE);
opt4.setFont(new Font("Dialog", Font.PLAIN, 20));

32
add(opt4);

groupoptions = new ButtonGroup();


groupoptions.add(opt1);
groupoptions.add(opt2);
groupoptions.add(opt3);
groupoptions.add(opt4);

next = new JButton("Next");


next.setBounds(1000, 450, 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(1000, 500, 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(1000, 550, 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 {

33
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, 900, 400);
} else {
g.drawString("Times up!!", 1100, 500);

34
}

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

35
}

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 CLASS :-
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 Quiz Game");

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

37
❖ Testing Process:

Signoff

❖ Testing Strategy:

The following outlines the types of testing that will be done for unit, integration,
and system testing. While it includes what will be tested, the specific use cases
that determine how the testing is done will be detailed in the Test Design
Document. The test cases that will be used for designing use cases is shown
below.

Future scope

We have put an endless effort on this application& also provided room for future
expansion of this application.
Interface can be enriched later.
Selection of alarm tone are in progress.
Prescription Parameter (PP) contains the necessary information of a medicine
including its name M, the dosage size g and the amount n to be taken each time
(as multiples of the dosage size) and its therapy duration T during which the
patient should take the medicine. A picture of the medicine is also incorporated to
assist patients identifying the medicine. This parameter can be added.
Dosage Parameter (DP) states the minimum and
maximum dose sizes [dmin, dmax] and the minimum and maximum separations
[nsmin, nsmax] between two consecutive doses. It also specifies the supply rate
(B, R), which the maximum dosage B is taken within any time interval R and the
demand rate (L, P) and which the minimum dosage L is taken in any time interval
p. DP parameter should be implemented in future day

38
Conclusion:-
Currently there are many medication reminder systems which are operable
manually. Due to increased manual work, the available system
becomes more time consuming. So in the given work, an attempt has been made
to implement fully automatic medication reminder system. It eases the user’s task
of recalling when to take the medicine by reminding them of the particular
medicine at the correct time thereby reducing the much prevalent manual work.

Bibliography:

❖ www.stackoverflow.com

❖ www.w3schools.com

39

You might also like