0% found this document useful (0 votes)
49 views25 pages

Quiz Game Project

project

Uploaded by

aryavardhan9966
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)
49 views25 pages

Quiz Game Project

project

Uploaded by

aryavardhan9966
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/ 25

SI.NO.

TOPIC
1. INTRODUCTION
• Introduction
• Objective
2. SYSTEMANALYSIS
• Existing system
• Problem with existing system
• Proposed system
• Important features of proposed system
• Objective of proposed system
• Computerised system
3. FEASIBILITYREPORT
• Economical feasibility
• Cost and benefit analysis
• Technical feasibility
• Operational feasibility
• Legal feasibility
4. SYSTEMREQUIREMENTS
• Functional requirements
• Non-functional requirements
• Hardware requirements
• Software requirements
5. PROJECTDESIGN
• Data flow diagram
• Entity relationship diagram
• Use case diagram
• Sequence diagram
6. CODE
7. OUTPUT
10. TECHNOLOGYUSED
• Front End
• Back End

10. CONCLUSION
11. LIMITATION
INTRODUCTION
1. Introduction

The "QuizGame" project is designed to manage a simple database of questions.


The question numbers are automatically generated by the software and
stored in a binary file named 'QUESTION'. This database serves as the
MASTER file and functions as a look-up table for information, such as
quiz options, related to the C programming language. In this software, users
are prompted with a question about C language. If the user provides an
incorrect answer, they lose the game, and the game is terminated.

2. Objective

The sole intention behind the development of this project is to generate


and manage a simple database for questions. The project is created
with the concept of a "QUIZ" in mind, focusing on the needs of the
customer. Data is stored in a binary file named "QUESTION," and
this database serves as the MASTER file. Reports are generated based
on the customer's stay and the payments made by the customer.
SYSTEMANALYSIS
1. EXISTINGSYSTEM
The existing system was manual, with all processes being carried out through
physical files. This approach involved many complexities. Whenever a new
student was admitted, separate files had to be maintained. Updating data
was a tedious task, and performing administrative tasks such as managing
class records, adding or modifying existing records, and maintaining user
lists was not easy.

2. PROBLEMWITHEXISTINGSYSTEM
In the existing system, all office work was done manually. The manual
processes were time-consuming, which resulted in slower operations.
The following are the main drawbacks of the existing system:The
existing system is totally manual thus there are chances of error in
processing.

• Thebasicandmajordrawbacksintheexistingsystemarethespeedofretrieva
lof data from files, which leads to delay.
• Maintenance of voluminous data is very cumbersome and laborious job.
• The manual jobs such as calculation are more error prone.
• There are plenty of chances of duplicity of data and information.
• Updating is very tedious job.

The above facts, figures and draw backs clearly indicate that there is need
for computerization and thus decided to computerize the "QUIZ
GAME". Since the existing system was totally manual which has lots of
complexities, shortcomings in itself and all the data was being stored in
registers, files etc.. thus to overcome the limitation of the existing
system, the new computerized system was needed, so that information
can be provided to the user more quickly, easily and more accurately.
3. PROPOSEDSYSTEM
Thenewsystemtitled"QUIZGAME"washenceproposedtoremoveallthedrawba
cks discussed above. Information is a vital ingredient for the operation
and management of any organization. Thus, any system should have the
ability to provide error free filtered information after processing there
quired data. This system has been taken up with a view for developing a
more sophisticated system that can be easily handled by any kind of
users. The
proposedsystemaimsatefficientandtimelyinformationfordecision-making,
integrate with other functions, and reduce redundant work.

4. IMPORTANTFEATURESOFPROPOSEDSYSTEMARE
• Consistent user inter face with high economic features built into it.
• System design is modular and structured way, so as to make
the integration with other subsystems easier.
• User has complete control as it provides and accepted only
appropriate and valid data.
• User-friendly error messages are provided wherever
necessary. Addition, deletion, modification of record is done
as and when needed.
• Provide admission to new students very easily.
• Records retrieval for users is also done by system.

5. OBJECTIVEOFPROPOSEDSYSTEM
• To reduce work load of staff.
• To reduce the delay in processing time.
• To reduce the delay in records update.
• To provide the user-friend lines in all possible ways.
• To provide greater flexibility.
• Make maintenance changes easy
6. COMPUTERIZEDSYSTEM
• The existing system is totally manual thus there are chances of error
in processing.
• Thebasicandmajordrawbacksintheexistingsystemarethespeedofretriev
alof data from files, which leads to delay.
• Maintenance of voluminous data is a very cumbersome and laborious
job. Manual tasks such as calculations are more prone to errors.".
• Thereareplentyofchancesofduplicityofdataandinformation.Updatingis
very tedious job.

FEASIBILITYSTUDY

The feasibility study proposes one or more conceptual solution to the


problem set of the project. In fact, it is an evaluation of whether it is
worth while to proceed with project or not. Feasibility analysis usually
considers a number of project alternatives, one that is chosen as the
most satisfactory solution. These alternatives also need to be evaluated
in a broad way without committing too many resources. Various steps
involved in feasibility analysis are:
• Toproposeasetofsolutionthatcanrealizetheprojectgoal.Thesesolutions
are usually descriptions of what the new system should look like.
• "Evaluation of the feasibility of such solutions often reveals
shortcomings."
• Initial goals. This step is repeated as the goals are adjusted
and the alternative solutions are evaluated.

1. ECONOMICFEASIBILITY
• "An evaluation of development cost weighed against the ultimate income
or benefit derived from the developed system or product is conducted. In
economic feasibility, a cost-benefit analysis is performed in which the
expected costs and benefits are evaluated.
• COSTANDBENEFITANALYSIS
Developing an IT application is an investment. Since after developing
that application, it provides the organization 's with profits. Profits can
be monetary or in the form of an improved working environment.
However, it carries risks,
because in some cases an estimate can be wrong and the project might
not actually turn out to be beneficial. Cost benefit analysis helps to give
management a picture of the cost, benefits and risks. It usually involves
comparing alternate investments. Cost benefit determines the benefits
and savings that are expected from the system and compares them with
the expected costs.

2. TECHNICALFEASIBILITY

"Technical feasibility includes both existing and new hardware and


software requirements needed to operate the project on the Turbo
C platform. The basic software requirement is Dev-C++, which is
used to develop the front end of the Quiz Game project. The
project is developed in Dev-C++, and the data is stored in files."

3. OPERATIONFEASIBILITY
Operationalfeasibilityismainlyconcernedwithissueslikewhetherthesystemwill
beu serif it is developed and implemented. Whether there will be
resistance from users that will affect the possible application benefits?
The essential questions that help in testing the technical feasibility of a
system are following:
• Does management support the project?
• Are the users not happy with current business practices? Will it
reduce the time considerably? If yes, then they will welcome
the change and the new system.
• Have the involved in the planning and development of the project?
Early involvement reduced the probability of resistance towards the
new system.

4. LEGALFEASIBILITY
A determination of any infringement, violation or liability that could result
from development of the system, legal feasibility tells that the software
used in the project should be original purchased from the legal authorities
and they have the license to use it or the software are pirated.
SYSTEMREQUIREMENTSSPECIFICATION
1. FUNCTIONALREQUIREMENT
User enter name:- Every student can enter name and access the features of
this application.
Attempt quiz:- "A user should be able to attempt any of the four sections
of the quiz and also have the option to skip questions."Check score:-
After completing a quiz, the user must be able to check the score of a
particular section.

2. NON-FUNCTIONALREQUIREMENTS
PERFORMANCEREQUIREMENTS
"The inbuilt SQLite database is used to store and retrieve data, and it should
be properly maintained, as the speed of queries will directly reflect the
overall performance of the application."
SAFETYANDSECUIRTYREQUIREMENTS
"This application won't access any device features such as contacts or the
message inbox, and therefore, it does not pose a threat to the user's
privacy."
All data entries can only be accessed by authorized users only.
SOFTWAREQUALITYATTRIBUTES
Thequalityofthissoftwarewillberepresentedbytheuserfriendlinessoftheuserint
erface, the security of the data, and the flexibility of manipulating data.
3. HARDWAREREQUIRMENTS

• PIV2.8GHzProcessorandabove
• RAM512MBand above
• HDD40GBharddiskspaceandabove

4. SOFTWAREREQUIRMENTS
• WINDOWSOS(NT/XP/7/10/11)
• Ms Office
• Dev C++

PROJECTDESIGN
• "The high-level UML design diagrams are created using open-source
software. Several entities were identified, and the relationships between
these entities are illustrated in these diagrams. The various diagrams
developed for this application include:"
• Data flow diagram
• Entity relationship diagram
• Use case diagram
• Sequence diagram
1. DATAFLOWDIAGRAM
Data Flow Diagram (DFD) is a diagrammatic representation of data
movement through a system -manual or automated from inputs to
outputs through processing. DFD helps in the analysis of the flow of data
through a system and thus help in identifying the system requirements.
The top level of DFD is known as Context level. It is the first step in
requirement determination, which aims at learning the general
characteristics of the business process and defines the system that will be
studied in the sense that it determines the boundaries .
2. ENTITYRELATIONSHIPDIAGRAM
The entity relationship diagram (ERD)depicts the relationship between the
data objects

The ERD is the notation that is used to conduct the date modeling activity
the attributes of each data object noted is the ERD can be described
resigned data object descriptions. The primary purpose of the ERD is to
represent data objects and their relationships.
3. USECASEDIAGRAM

A use case diagram is used to represent roles and action. Each user/role has
different privilege sand each perform different action. A use case
diagram is used to represent the actions by the user in a system. It has
user in a system
4. SEQUENCEDIAGRAM

A sequence diagram shows the interaction between the various classes and
processes and the interaction order necessary to perform the
functionality of the scenario. It showcases the classes involved in an
interaction and the function calls and sequence of messages ex changed
in that interaction. It forms a prototype to represent the behavior of
various modules of application. The interaction between the various
classes is represented by the following sequence diagrams.
CODE

#include <stdio.h>
#include <conio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

void show_record();
void reset_score();
void help();
void edit_score(float score, char playername[]);

int main() {
int count, r, i, n;
float score;
char choice;
char playername[20];

while (1) {
system("cls");
printf("\t\t\tC PROGRAM QUIZ GAME\n");
printf("\n\t\t\tWELCOME TO THE GAME\n");
printf("\t\tBECOME A PROFESSIONAL IN IQ!!!!!!!!!\n");

printf("\n\t\t > Press S to start the game");


printf("\n\t\t > Press V to view the highest score");
printf("\n\t\t > Press R to reset score");
printf("\n\t\t > Press H for help");
printf("\n\t\t > Press Q to quit\n\n");

choice = toupper(getch());

switch (choice) {
case 'V':
show_record();
break;
case 'H':
help();
getch();
break;
case 'R':
reset_score();
getch();
break;
case 'Q':
exit(1);
case 'S':
system("cls");
printf("\n\n\t\tRegister your name: ");
gets(playername);
system("cls");
printf("\nWelcome %s to the C Program Quiz Game", playername);
printf("\n\n>> There are 2 rounds: WARMUP ROUND &
CHALLENGE ROUND");
printf("\n>> Answer at least 3 out of 5 questions correctly in the
warmup round to proceed.");
printf("\n>> In the challenge round, you will face 10 questions, each
worth $1000.");
printf("\n>> Press A, B, C, or D to answer. No negative marking.\n");
printf("\n\t********** ALL THE BEST **********\n");
printf("\nPress Y to start or any other key to return to the menu.");

if (toupper(getch()) == 'Y') {
goto home;
} else {
continue;
}
}

home:
system("cls");
count = 0;
for (i = 1; i <= 5; i++) {
system("cls");
switch (i) {
case 1:
printf("\n\nWhich language is the predecessor to C Programming
Language?\n");
printf("\nA. BCPL\t\tB. C++\nC. A\t\tD. B\n");
if (toupper(getch()) == 'A') count++;
break;
case 2:
printf("\n\nC programming language was developed by?\n");
printf("\nA. Ken Thompson\t\tB. Bill Gates\nC. Dennis
Ritchie\t\tD. Peter Norton\n");
if (toupper(getch()) == 'C') count++;
break;
case 3:
printf("\n\nC was developed in which year?\n");
printf("\nA. 1970\t\tB. 1972\nC. 1976\t\tD. 1980\n");
if (toupper(getch()) == 'B') count++;
break;
case 4:
printf("\n\nC is a language?\n");
printf("\nA. High Level\t\tB. Low Level\nC. Middle Level\t\tD.
Machine Level\n");
if (toupper(getch()) == 'C') count++;
break;
case 5:
printf("\n\nC language is available for which OS?\n");
printf("\nA. DOS\t\tB. Windows\nC. Unix\t\tD. All of these\n");
if (toupper(getch()) == 'D') count++;
break;
}
getch();
}

if (count >= 3) {
system("cls");
printf("\n\n\t**CONGRATULATIONS %s, you are eligible for the
challenge round!**\n", playername);
printf("\nPress P to proceed.\n");
if (toupper(getch()) != 'P') continue;
} else {
system("cls");
printf("\n\nSORRY, YOU ARE NOT ELIGIBLE TO PLAY THIS
GAME. BETTER LUCK NEXT TIME.\n");
getch();
continue;
}

count = 0;
for (i = 1; i <= 2; i++) { // Add more questions for a full challenge round
system("cls");
switch (i) {
case 1:
printf("\n\nWhich is the valid expression in C?\n");
printf("\nA. int my_num = 100,000;\t\tB. int my_num =
100000;\nC. int my_num = 1000;\t\tD. int $my_num = 10000;\n");
if (toupper(getch()) == 'B') count++;
break;
case 2:
printf("\n\nWhich of the following cannot be a variable name in
C?\n");
printf("\nA. volatile\t\tB. true\nC. friend\t\tD. export\n");
if (toupper(getch()) == 'A') count++;
break;
}
getch();
}

score = (float)count * 1000;


system("cls");
if (score >= 10000) {
printf("\n\n\t\t********** CONGRATULATIONS **********\n");
printf("You won $%.2f\n", score);
} else {
printf("\n\nSORRY, YOU DID NOT WIN ANY CASH.\n");
printf("Thanks for participating!\n");
}
getch();
edit_score(score, playername);
}
return 0;
}

void show_record() {
system("cls");
char name[20];
float scr;
FILE *f = fopen("score.txt", "r");
fscanf(f, "%s %f", name, &scr);
printf("\n\t*****************************\n");
printf("\t%s has the highest score: %.2f\n", name, scr);
fclose(f);
getch();
}

void reset_score() {
system("cls");
char nm[20];
float sc = 0;
FILE *f = fopen("score.txt", "r+");
fscanf(f, "%s %f", nm, &sc);
fseek(f, 0, SEEK_SET);
fprintf(f, "%s %.2f", nm, sc);
fclose(f);
}

void help() {
system("cls");
printf("\n\tHELP\n");
printf("***************** C Program Quiz Game
*****************\n");
printf(">> There are two rounds: WARMUP ROUND & CHALLENGE
ROUND\n");
printf(">> Warmup round has 5 questions. Get 3 right to proceed.\n");
printf(">> Challenge round has 10 questions worth $1000 each.\n");
printf(">> Choose the right option using A, B, C, or D.\n");
printf(">> No negative marking.\n");
printf("\n********************* BEST OF LUCK!
*********************\n");
}

void edit_score(float score, char plnm[20]) {


float sc;
char nm[20];
FILE *f = fopen("score.txt", "r");
fscanf(f, "%s %f", nm, &sc);
fclose(f);

if (score > sc) {


f = fopen("score.txt", "w");
fprintf(f, "%s %.2f", plnm, score);
fclose(f);
}
}

OUTPUT

1. C PROGRAM QUIZ

GAME WELCOME
to
THE GAME
BECOME A PROFESSIONAL IN IQ!!!!!!!!!

> Press S to start the game


> Press V to view the highest score
> Press R to reset score
> Press H for help
> Press Q to quit

2. Registering the Player's Name (If the user presses 'S')


If the user presses S to start the game, they will be asked to enter
their name:
p
g
s
q
l

C
o
p
y
Register your name:
<user enters their name, e.g., "John">
Then, some tips about the game will be displayed:
vbnet
Copy
Welcome John to C program quiz game

Here are some tips you might want to know before playing:
>> There are 2 rounds in this Quiz Game: WARMUP ROUND &
CHALLENGE ROUND
>> In the warmup round, you will be asked a total of 5 questions
to test your general knowledge.
>> You are eligible to play the game if you give at least 3 right
answers, otherwise, you can't proceed further.
>> In the challenge round, you will be asked a total of 10 questions.
>> Each right answer will be awarded $1000.
>> You will be given 4 options and you have to press A, B, C, or
D for the right option.
>> No negative marking for wrong answers.

********** ALL THE BEST

********** Press Y to start the

game!
Press any other key to return to the main menu!
If the user presses Y, the game will proceed; otherwise, they will
return to the main menu.
3. Warm-up Round (5 Questions)
In this round, the player will be asked 5 general knowledge
questions. The program will present a question with 4 options,
and the player will input an answer (A, B, C, or D). For each
correct answer, they will receive one point. Incorrect answers
will display the correct answer.
For example:
Which of the following languages is the predecessor to C
Programming Language?

A. BCPL B. C++
C. A D. B

<user presses A>


Correct!!!
If the player answers at least 3 questions correctly, they will
proceed to the challenge round. Otherwise, they will be told:
cs
s

C
o
p
y
SORRY, YOU ARE NOT ELIGIBLE TO PLAY THIS GAME.
BETTER LUCK NEXT TIME.
4. Challenge Round (10 Questions)
If the player qualifies, they will move on to the challenge round
where 10 more difficult questions will be asked. For each
correct answer, the player earns $1000.
For example:
csh
a
r
p

C
o
p
y
Which is the valid expression in C?

A. int my_num = 100,000; B . int my_num = 100000;


C. int my_num = 1000; D . int $my_num = 10000;

<user presses B>


Correct!!!
At the end of the challenge round, the score is calculated based on
the number of correct answers (each correct answer is worth
$1000).
5. Final Score and Record Update
The program will display the player's total score:
nginx
Copy
CONGRATULATIONS John, you are eligible to play the game!

You won $10000


The score will be saved and compared with the highest score in
the score.txt file. If this player’s score is higher than the stored
score, the highest score will be updated.
If the player did not win any money (score < $10000):
objectivec
Copy
SORRY, YOU DID NOT WIN ANY CASH.
Thanks for participating!
6. Viewing the Highest Score (If the user presses 'V')
If the user presses V to view the highest score, the program will
display:
markdown
copy of
*****************************
John has secured the highest score 10000.00
7. Resetting the Score (If the user presses 'R')
If the user presses R to reset the score, the program will reset
the score stored in the score.txt file to 0.00.
8. Help Section (If the user presses 'H')
If the user presses H for help, the program will display:
markdown

***************** C Program Quiz Game *****************


>> There are two rounds in the game: WARMUP ROUND &
CHALLENGE ROUND
>> In warmup round you will be asked a total of 5 questions to
test your general knowledge.
>> You will be eligible to play the game if you give at least 3
right answers.
>> In the challenge round, you will be asked 10 questions. Each
right answer is awarded $1000.
>> You will be given 4 options, and you need to press A, B, C, or
D for the correct option.
>> No negative marking for wrong answers.

********************* BEST OF LUCK!


*********************
9. Exiting the Game (If the user presses 'Q')
If the user presses Q to quit the game, the program will terminate.

TECHNOLOGYUSED
1. FRONTEND
• C LANGUAGE
C was evolved from earlier programming languages such as ALGOL and
BCPL. It was developed by Dennis Ritchie at Bell Laboratories in 1972.
C inherited many concepts from its predecessors and introduced
powerful new features such as data types, making it a flexible and
versatile language.

C is known for being powerful, flexible, portable, and elegantly structured.


Its growing popularity can be attributed to its many desirable qualities.
It is a robust language with a rich set of built-in functions and operators,
enabling programmers to write code for even the most complex
software systems. Thanks to these capabilities, C is suitable for both
system software and business applications.

One of the most notable strengths of C is its portability. Programs written in


C can often be run on different computers and operating systems with
little or no modification. This makes C especially valuable in
environments where hardware or software platforms may vary over
time..

2. BACKEND
Any file for storing database. Many real life problems handle large volumes
of data so we need to use some devices such as floppy disk or hard disk
to store a data. The data is store din these devices using a concept of
files. A file is a collection of data stored in a particular area on a disk.
Programs can be designed to perform read and write operations on these
files.
CONCLUSION
The Quiz Game is capable of handling a number of question
records, with all their information stored in a backend file.
LIMITATION
 Dependence on final management.
 The size of the database increases day by day, increasing
the load on database backups and data maintenance
activities.
 Training for simple computer operations is necessary for
the users working on the system.
 The database is maintained using a computerized file-
based system.
 This is a web-based project.
 The project objectives are fully aligned with the business
goals.
 Many projects end up over budget and may take years or
months to complete; some are even canceled or
terminated.

You might also like