You are on page 1of 50

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belagavi-590018

A
MINI PROJECT REPORT
ON
“Quiz Management System”
Submitted in partial fulfillment of the bachelor’s degree
IN
INFORMATION SCIENCE AND ENGINEERING

VI SEMESTER FILE STRUCURE LABORATORY WITH MINI PROJECT (18ISL--)

Submitted By

ABHISHEK R 1HK20IS002
ASHIK S 1HK20IS015
MOHAMMED HASHIM 1HK20IS061

Under the guidance of


Prof. Sneha K
Assistant professor
Department of Information Science and Engineering
2022-2023

HKBK COLLEGE OF ENGINEERING


22/1, Nagawara, Bengaluru – 560045.

E-mail: info@hkbk.edu.in, URL: www.hkbk.edu.in


DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING
VISVESVARAYA TECHNLOGICAL UNIVERSITY

A
MINI PROJECT REPORT
ON
“Quiz Management System”

Submitted in partial fulfillment of the project in


VI SEMESTER, FILE STRUCTURE LABORATORY WITH MINI PROJECT (18CSL58)

2022-23
SUBMITTED BY:

ABHISHEK R 1HK20IS002

ASHIK S 1HK20IS015

MOHAMMED HASHIM 1HK20IS061


ACKOWLEDGEMENT

We would like to place our regards and acknowledgement to all who helped in
making this project possible. There are many people who worked behind the screen to help
make it possible the below listed are a few of them.
First, We would take this opportunity to express our heartfelt gratitude to Mr. C.M.
Ibrahim, Chairman, Mr. C.M. Faiz Mohammed, Director, and Dr. Tabassum Ara, Principal
for all the infrastructure provided to complete the project on time.

We would like to deeply indebted to Dr. A. Syed Mustafa, HOD, Department of


Information Science and Engineering for the ineffable encouragement he provided in
successful completion of the project.

We will sincerely thank our guide, Prof. Sneha K, Assistant Professor for their
constant assistance, support, patience, endurance, and constructive suggestions for the
betterment of the project.
We are extremely thankful to the teaching and non-teaching staff of the
Department of Information Science and Engineering for their valuable guidance and
cooperation throughout our dissertation.
DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING

HKBK COLLEGE OF ENGINEERING, BANGALORE-560045

DECEMBER – 2022

DECLARATION

We ABHISHEK R and ASHIK S, student of the 6th semester of B.E in Information Science
and Engineering, H.K.B.K. COLLEGE OF ENGINEERING, Bengaluru, hereby declare that
the project report entitled “Quiz Management System” is completed and written by
us has not been previously formed the basis for the award of any diploma or degree
or certificate.

Date: 30/12/2023
Place: Bengaluru

ABHISHEK R 1HK20IS002
ASHIK S 1HK20IS015

MOHAMMED HASHIM 1HK20IS061


ABSTRACT

This report specifies various processes and techniques used in


gathering requirements, designing, implementing, and testing for the
project on Quiz Management System. The sole intension behind the
consideration of this project is to generate and manage simple
databases for questions. This project is developed considering “QUIZ”
information keeping context of the customer in mind. Here, data is
stored in binary file by “QUESTION” and this database is basically used
as MASTER file. Reports are designed on the basis of the user’s choice
of answers.
TABLE OF CONTENTS
ACKNOWLEDGEMENT..................................................................................................................... III

ABSTRACT ........................................................................................................................................ IV
TABLE OF CONTENTS........................................................................................................................ V
LIST OF FIGURES .............................................................................................................................. VI
LIST OF TABLES ............................................................................................................................... VII

CHAPTER 1 INTRODUCTION............................................................................................................. 1
1.1 Overview ................................................................................................................ 1
1.2 About Quiz game ................................................................................................... 1

1.3 Purpose and Scope ................................................................................................ 1


CHAPTER 2 REQUIREMENT SPECIFICATION .................................................................................... 3
2.1 Functional Requirements ...................................................................................... 3
2.2 Software Requirements......................................................................................... 4
2.3 Technologies Used ................................................................................................. 4
CHAPTER 3 ANALYSIS AND DESIGN ................................................................................................. 6
3.1 Analysis .................................................................................................................. 6

3.2 Feasible study ........................................................................................................ 7


3.3 Data flow Diagram ................................................................................................. 8
3.4 Use Case Diagram .................................................................................................. 8

3.5 List of Questions and options .............................................................................. 10


CHAPTER 4 IMPLEMENTATION...................................................................................................... 12
4.1 System Testing ..................................................................................................... 12

4.2 Unit Testing.......................................................................................................... 12


4.3 Integration Testing .............................................................................................. 12
4.4 Source Code......................................................................................................... 14
CHAPTER 5 SNAPSHOTS ................................................................................................................. 25

CONCLUSION .................................................................................................................................. 34
REFERENCES ................................................................................................................................... 35
ISE Department Visitor Mission .................................................................................................... 36

Course Outcome (CO) .................................................................................................................... 37


Program Outcome (PO).................................................................................................................. 38
ISE Department Program Specific Outcome (PSO) ....................................................................... 40
LIST OF FIGURES

SL No. Figure No. Topic of figures Page No.

1. 2.1.1 Hardware Configuration (Client side) 03

2. 2.1.2 Hardware Configuration (Server side) 03

3. 2.2.3 Software Configuration 04

4. 3.2.1 Data Flow Diagram

4. 3.2.1 Use Case Diagram 07

5. 5.1.1 Screenshot of Opening Screen 19

6. 5.2.1 Screenshot of Taking Users Information 19

7. 5.3.1 Screenshot of General QUIZ Questions Page 20

8. 5.4.1 Screenshot of C++ QUIZ Questions page

9. 5.5.1 Screenshot of Java QUIZ Questions page

10. 5.6.1 Screenshot of C QUIZ Questions page

11. 5.7.1 Screenshot of Losing game Page 20

12. 5.8.1 Screenshot of Winning game


Quiz Management System 2022-23

CHAPTER-01

INTRODUCTION

1.1 Overview

Quiz Management system is a software application Program with the File


Structure concept and this project is completely programmed using C++ Programming
language designed to facilitate creation of quizzes. It provides a centralized platform for
teachers, trainers, or administrators to create quiz questions and to track student
performance. File Structure typically follows a hierarchical organization to store and
manage various components of the system.

1.2 About QUIZ GAME


This ‘QUIZ GAME’ Project is designed for a question which you can generate and manage a
simple database in which by using you can generate and manage a simple database for
different types of questions. The question number is automatically generated by system
software, and it is stored in a binary file format by the name ‘QUESTION’. This type of
database is basically used as a MASTER file to be used as a look-up table for information like Quiz
option, Sub Menu, either C/C++/Java/ or General and Return . In this developed software you can
ask for any menu based on the menu question will be asked to the user and the user get 10sec for
answering the questions. Incase user answers core questions will be getting 10 points on each
question. Incase user attempted a wrong answer they will lose the game & game is closed.

1.3 Purpose and Scope

The purpose of the 'QUIZ GAME' project is to create a software application Program
that enables users to generate and manage a simple database for different types of
questions. The system automatically generates question numbers, which are stored in a
binary file format named 'QUESTION'. This database serves as a master file that acts as
a lookup table for various pieces of information, including quiz options, submenus (such
as C, C++, Java, General), and the option to return to the main menu.

Department of ISE, HKBKCE


1
Quiz Management System 2022-23

The scope of the project involves providing users with a menu-based interface where
user can choose different quiz options which includes C,C++,Java and General Quiz
MCQs. Once a specific option is selected, the system presents a corresponding question
to the user. The user is given 10 seconds to answer each question. If the user answers
correctly, they are awarded 10 points. However, if the user attempts a wrong answer,
they lose the game and it is closed.

Overall, the project aims to create an interactive quiz game that allows users to test
their knowledge and a mind game where users can refresh their mind by playing and
getting a lot of knowledge benifits in various subject areas. The focus is on generating
and managing a simple question database, providing a time limit for answering
questions, and implementing a scoring system. The project's scope does not extend to
complex features such as user authentication, advanced question types, or extensive data
analysis.

Department of ISE, HKBKCE


2
Quiz Management System 2022-23

CHAPTER-02

REQUIREMENT SPECIFICATION

2.1 Fundamental Requirements

Hardware Configuration

Client Side:
RAM 4GB

Hard disk 10GB

Processor 1.7 GHz Pentium IV

Table 2.1.1 Client Side

Server side:
RAM 1 GB

Hard disk 20 GB

Processor 1.7 GHz

Table 2.1.2 Server Side

Department of ISE, HKBKCE


3
Quiz Management System 2022-23

2.2 Software Requirements

Windows XP Service pack 1


Operating System

Compiler TurboC3/any C++ Compiler

Table 2.2.1 Software Requirements

2.3 Technologies used

1) Front End:

➢ C++
C++ is an object-oriented programming language. It is a superset of C language.
C++ adds on number of object oriented features such as object inheritance, function
overloading, operator overloading to C. C++ is a versatile language for handling
very large programs.

➢ Uses of C++:
• C++ can be used to build a variety of system such as editor, compiler,
database, communication system.
• C++ is easily maintainable and expandable.
• C++ allows you to work with binary files, which can be useful when
dealing with complex data structures or when you need to store and retrieve
the data in a specific format. You can use ‘ifstream’ and ‘ofstram ’ with

Department of ISE, HKBKCE


4
Quiz Management System 2022-23

appropriate binary mode flags(‘ios::binary’) to read and write the binary


data.

2) Back End:

➢ Any file 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 data.

➢ The data is stored in these devices using 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.

Department of ISE, HKBKCE


5
Quiz Management System 2022-23

CHAPTER-03

ANALYSIS

3.1 Analysis

1. Question Database: The system generates a question number automatically Which is


initialized in the C++ code already and stores it in a binary file format called 'QUESTION'.
This file acts as a ‘MASTER’ database containing questions for the quiz game.

2. Quiz Options and Sub Menus: The 'QUESTION' file serves as a lookup table for
various quiz options and sub-menus. These options could include categories such as C,
C++, Java and General. The sub-menu feature allows the user to navigate through different
question categories.

3. Menu and Question Prompts: The software presents a menu to the user, prompting
them to select based on the available options. Upon selecting a specific menu option, a
corresponding subject related question’s which are asked to the user.

4. Time Limit: The user is given a time limit of 10 seconds to answer each question. This
adds a time constraint to the quiz game, making it more challenging and engaging.

5. Scoring System: If the user answers a question correctly, they are awarded 1 points.
This scoring system provides a way to track and reward the user's performance.

6. Game Termination: If the user attempts an incorrect answer, they lose the game, where
there are 10 questions in each subject. This implies that a wrong answer for less than 7
questions results in the termination of the quiz, and the user will lose the game.

Based on this analysis, the 'QUIZ GAME' project aims to provide a quiz-based game
experience with various question categories, a time limit for answering questions, a scoring
system, and the ability to generate and manage a question database. The project's scope is
focused on these core functionalities and does not explicitly mention features such as user
authentication, multiplayer capabilities, or advanced analytics.

Department of ISE, HKBKCE


6
Quiz Management System 2022-23

3.2 Feasible Study

1. Define Project Objectives: Clearly define the objectives of the project. Identify the
target audience for the quiz game, determine the intended purpose of the game
(educational, entertainment, etc.), and specify the desired outcomes (increased knowledge,
engagement, etc.).

2. User Requirements Analysis: Gather user requirements by conducting surveys,


interviews, or focus groups with the target audience. Understand their expectations,
preferred features, difficulty levels, categories, and any additional functionalities they may
desire. Use this information to refine and enhance the project's scope and features.

3. Technical Feasibility: Assess the technical feasibility of the project by evaluating the
required resources, such as the programming languages, frameworks, and libraries suitable
for developing the quiz game. Determine if the necessary hardware and software
infrastructure can be efficiently set up and maintained. Identify any potential technical
challenges and consider alternative solutions.

4. Resource Evaluation: Evaluate the availability and allocation of resources, including


the development team, budget, and time frame. Assess if the required resources are
sufficient to complete the project successfully within the defined constraints.

5. Risk Analysis: Identify potential risks and challenges that may arise during the project's
development and implementation phases. Evaluate the impact and likelihood of these risks,
and devise mitigation strategies to address them effectively. This could include risks related
to technology, market competition, user acceptance, or time constraints.

6. Project Timeline: Create a project timeline outlining the various phases, milestones,
and deliverables. Estimate the time required for development, testing, and deployment,
considering any dependencies or constraints.

By conducting a thorough feasible study, you can gain insights into the viability and success
factors of the 'QUIZ GAME' project, helping you make informed decisions and ensure a well -
planned and successful implementation.

Department of ISE, HKBKCE


7
Quiz Management System 2022-23

3.3 Data Flow Diagram

QUIZ
GAME

GAME

EDIT
PLAY
ADD
QUESTIONS

C++ DELETE
GENERAL

MODIFY
Java C

D.B.M.S

RETURN
Fig. 3.3.1 Data flow diagram

Department of ISE, HKBKCE


8
Quiz Management System 2022-23

3.4 Use Case Diagram

The use case partitions the functionality of a system into a small number of discrete
units, and all system behavior must fall under some use case. Each use case should
represent a kind of service that the system provides, something that provides value to the
actor.

QUIZ Game

Answer
Questions

Test
Results

Authentication

End
Customer Questions

Manage Questions

Fig. 3.4.1 Use Case diagram

Department of ISE, HKBKCE


9
Quiz Management System 2022-23

3.5 List of Questions and Options

Question 1:
"garampani sanctuary is located at : "
Options: 1. junagarh,gujarat
2. diphu,assam
3. kohima,nagaland
4. gangtok,sikkim

Question 2:
"golf player vijay singh belongs to which country : "
Options: 1. USA
2. FIJI
3. INDIA
4. UK

Question 3:

"First Afghan war took place in : "


Options: 1. 1839
2. 1843
3. 1833
4. 1848

Question 4:

"each year world red cross and red crescent day is celebrated on : "
Options: 1. may 8
2. may 18
3. june 8
4. june 14

Department of ISE, HKBKCE


10
Quiz Management System 2022-23

Question 5:

"the ozone layer restricts : "


Options: 1. visible light
2. infrared rays
3. x rays & gamma rays
4. uv rays

Question 6:

"ecology deals with : "


Options: 1. Birds
2. cell formation
3. relation between organisms
4. tissues

Question 7:
"fillaria is caused by : "
Options: 1. Bacteria
2. Mosquito
3. Protozoa
4. virus

Question 8:

"coral refers in india can be found in :


Options: 1. the coast of orrisa
2. Waltair
3. Rameshwaram
4. trivandrum

Department of ISE, HKBKCE


11
Quiz Management System 2022-23

Question 9:

"durand cup is associated with the game of : "


Options: 1. Cricket
2. Football
3. Hockey
4. Volleyball

Question 10:

"headquarters of UNO are situated at : "

Options: 1. Newyork usa

2. Hague

3. Geneva

4. Paris

Department of ISE, HKBKCE


12
Quiz Management System 2022-23

CHAPTER-04

IMPLEMENTATION

4.1 System Testing


After all phases have been perfectly done, the system will be implemented to the server
and the system can be used.

The goal of the system testing process is to determine all faults in the project. The
program was subjected to a set of test inputs and many explanations were made and based
on these explanations it will be decided whether the program behaves as expected or not.
Our Project went through the following levels of testing.
1) Functionality Testing
2) Usability Testing
3) Performance Testing
4) Compatibility Testing
5) Security Testing
6) Error Handling Testing
7) Regression Testing
8) Robustness Testing:

1. Functionality Testing: This form of testing focuses on verifying that all the intended
features and functions of the system are working correctly or not. It involves testing the
question generation and management, database operations, menu navigation, and scoring
mechanism of the project. Test cases can be created to cover different scenarios, such as
adding questions, retrieving questions, selecting menu options, and scoring calculations.

2. Usability Testing: This type of testing assesses the user-friendliness and ease of use of
the software for this project. It involves evaluating how easily users can navigate through
the menus, understand the questions, and input their answers. Usability testing can involve
real users performing tasks and providing feedback on the system's usability.

3. Performance Testing: Performance testing evaluates the system's responsiveness and


stability under different load conditions. It ensures that the system can handle a large

Department of ISE, HKBKCE


13
Quiz Management System 2022-23

number of users accessing the database simultaneously and responding within the specified
time limit of 10 seconds also storing the information. Performance tests can include stress
testing, load testing, and measuring response times under various scenarios.

4. Compatibility Testing: This testing checks whether the system is compatible with
different operating systems, browsers, and hardware configurations. It ensures that the
software functions correctly across different platforms and environments, Since this project
is not verified in all platforms. Compatibility testing involves executing the application on
various platforms and verifying its behavior and functionality.

5. Security Testing: Security testing focuses on identifying vulnerabilities and ensuring


the system's protection against unauthorized access, data breaches, or any potential security
risks which occurs in the QUIZ. It includes testing the authentication and authorization
mechanisms, data encryption, and secure storage of sensitive information like user scores .

6. Error Handling Testing: This form of testing evaluates how the system handles errors
or unexpected situations. It involves intentionally inducing errors, such as entering invalid
inputs, to verify that the system responds appropriately with error messages and does not
crash or produce incorrect results in the result.

7. Regression Testing: Regression testing is performed to ensure that new updates or


modifications to the system do not introduce any defects or issues in previously working
functionality. It involves retesting previously tested features and test cases to verify their
continued functionality.

8. Robustness Testing: Robustness testing evaluates the system's ability to handle


unexpected inputs or scenarios. It involves testing the system's resilience against invalid or
out-of-range inputs, as well as unexpected interruptions like power failures or system
crashes project do not affect by all of these problems.

These forms of system testing will help in assessing and validating the functionality,
performance, usability, security, and reliability of the developed software.

Department of ISE, HKBKCE


14
Quiz Management System 2022-23

4.2 Unit Testing

Unit Testing is a software testing technique by means of which individual units of


software i.e group of computer program modules, usage procedures and operating
procedures are tested to determine whether they are suitable for use or not. It is a testing
method using which every independent module is tested to determine if there is any issue
by the developer himself.

4.3 Integration Testing

The modules, which are tested in the Unit Testing, are integrated to build the overall
system. It is observed that many errors crop up when the modules joined together. Integration
testing uncovers these errors while integrating the modules. It helps in establishing
confidence (correctness) in the complete, assembled system. It tests the System Design. It
focusses on control, communication, interfaces, performance (other system qualities). It
makes use of stubs, test-beds, data generators. It is the phase of software testing in which
individual software modules are combined and tested as a group. It follows unit testing and
precedes system testing. Integration testing takes as its input modules that have been unit
tested, groups them in larger aggregates, applies tests defined in an integration test plan to
those aggregates, and delivers as its output the integrated system ready for system testing.
Integration testing concentrates entirely on module interactions, assuming that the details
within each module are accurate. Module and Integration testing can be combined,
verifying the details of each module's implementation in an integration context. Many
projects compromise, combining module testing with the lowest level of subsystem
integration testing, and then performing pure integration testing at higher levels.

4.4 Source Code

#include<iostream.h>
#include<conio.h>
class student{
char name[10];
int roll;
int choice;
public:

Department of ISE, HKBKCE


15
Quiz Management System 2022-23

void getdata();

};

void student::getdata()
{
cout<<"\tEnter your name :";
cin>>name;
cout<<"\n\tEnter your roll no. : ";
cin>>roll;
}

class quiz{

int choice;
public:
void general(){
int marks=0;
cout<<"\t 1. Which College In Bengaluru Ranked 24th in all India private
Institute Ranking :" <<endl;
cout<<"\tA. HKBK College of Engineering"<<endl;
cout<<"\tB. CMR Institute of Technology"<<endl;
cout<<"\tC. BNM Institute of Technology"<<endl;
cout<<"\tD. School of Engineering, Presidency University"<<endl;
choice=getch();
if(choice=='A' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;

Department of ISE, HKBKCE


16
Quiz Management System 2022-23

}
cout<<"\t 2. garampani sanctury is located at:" <<endl;
cout<<"\tA. junagarh,gujarat"<<endl;
cout<<"\tB. diphu,assam"<<endl;
cout<<"\tC. kohima,nagaland"<<endl;
cout<<"\tD. gangtok,sikkim"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 3. golf player vijay singh belongs to which country:" <<endl;
cout<<"\tA. USA"<<endl;
cout<<"\tB. FIJI"<<endl;
cout<<"\tC. INDIA"<<endl;
cout<<"\tD. UK"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 4. First Afghan war took place in :" <<endl;
cout<<"\tA. 1839"<<endl;
cout<<"\tB. 1843"<<endl;
cout<<"\tC. 1833"<<endl;

Department of ISE, HKBKCE


17
Quiz Management System 2022-23

cout<<"\tD. 1848"<<endl;
choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 5. Each year world red cross and red cresent day is :" <<endl;
cout<<"\tA. may 8"<<endl;
cout<<"\tB. may 18"<<endl;
cout<<"\tC. june 8"<<endl;
cout<<"\tD. june 14"<<endl;
choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 6. The ozone layer restricts:" <<endl;
cout<<"\tA. Visible light"<<endl;
cout<<"\tB. infrared rays"<<endl;
cout<<"\tC. X rays"<<endl;
cout<<"\tD. UV rays"<<endl;
choice=getch();
if(choice=='D' || choice=='d')
{
cout<<"\nYour answer is correct"<<endl;

Department of ISE, HKBKCE


18
Quiz Management System 2022-23

marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 7. Ecology Deals with :" <<endl;
cout<<"\tA. Birds"<<endl;
cout<<"\tB. Cell Formation"<<endl;
cout<<"\tC. Relation Between Organisms"<<endl;
cout<<"\tD. Tissues"<<endl;
choice=getch();
if(choice=='C' || choice=='c')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 8. fillaria is coused by :" <<endl;
cout<<"\tA. Bacteria"<<endl;
cout<<"\tB. mosquito"<<endl;
cout<<"\tC. worms"<<endl;
cout<<"\tD. virus"<<endl;
choice=getch();
if(choice=='C' || choice=='c')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}

Department of ISE, HKBKCE


19
Quiz Management System 2022-23

cout<<"\t 9. coral refers in India can be found in:" <<endl;


cout<<"\tA. The coast of orrisa"<<endl;
cout<<"\tB. Waltair"<<endl;
cout<<"\tC. rameshwaram"<<endl;
cout<<"\tD. trivandrum"<<endl;
choice=getch();
if(choice=='D' || choice=='d')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 10. durand cup is associated with the name of:" <<endl;
cout<<"\tA. cricket"<<endl;
cout<<"\tB. football"<<endl;
cout<<"\tC. hocky"<<endl;
cout<<"\tD. volleyball"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\n\n \n\n\t\t\tyour score is: \n\n\n\n"<<marks;
if(marks>6)
cout<<"\t\t\tCongratulations!!!!\n\nYOU WON THE QUIZ"<<endl;
else
cout<<"\t\t\tResult:lost :(\n\nbetter luck next time"<<endl;

Department of ISE, HKBKCE


20
Quiz Management System 2022-23

void cpp(){
int marks=0;
cout<<"\t1.What is correct syntax to output \Hello World\ in c++
?"<<endl;
cout<<"\tA. cout<<\*Hello World *\ "<<endl;
cout<<"\tB. system.out.print(\*Hello World *\)"<<endl;
cout<<"\tC. console.writeln(\*Hello World *\) "<<endl;
cout<<"\tD. printf(\*Hello World *\)"<<endl;
choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}

cout<<"\n\n\t2.Who is the developer of C++ ?"<<endl;


cout<<"\tA. Dennis Ritchie"<<endl;
cout<<"\tB. Bjarne Stroustrup"<<endl;
cout<<"\tC. James Goslings "<<endl;
cout<<"\tD. Alfred Harry"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;

Department of ISE, HKBKCE


21
Quiz Management System 2022-23

}
cout<<"\t3.Identify the correct extension of the user-defined header file
in C++"<<endl;
cout<<"\tA. .cpp<<\*Hello World *\ "<<endl;
cout<<"\tB. .hg"<<endl;
cout<<"\tC. .h"<<endl;
cout<<"\tD. .hf"<<endl;
choice=getch();
if(choice=='C' || choice=='c')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}"<<endl;
cout<<"\t4. Identify the incorrect constructor type."<<endl;
cout<<"\tA. Friend constructor"<<endl;
cout<<"\tB. default Constructor"<<endl;
cout<<"\tC. parametarized constructor"<<endl;
cout<<"\tD. copy constructor"<<endl;
choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t5. C++ Uses Which approach?"<<endl;
cout<<"\tA. right-left"<<endl;
cout<<"\tB. Top-down"<<endl;

Department of ISE, HKBKCE


22
Quiz Management System 2022-23

cout<<"\tC. left-right"<<endl;
cout<<"\tD. bottom-up"<<endl;
choice=getch();
if(choice=='D' || choice=='d')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t6. Which of the following data type is suppoeted in C++ but not
in C?"<<endl;
cout<<"\tA. int"<<endl;
cout<<"\tB. bool"<<endl;
cout<<"\tC. double"<<endl;
cout<<"\tD. float"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t7. Identify the correct syntax for declaring arrays in
C++."<<endl;
cout<<"\tA. array arr[10]"<<endl;
cout<<"\tB. array{10}"<<endl;
cout<<"\tC. int arr[10]"<<endl;
cout<<"\tD. int arr"<<endl;
choice=getch();

Department of ISE, HKBKCE


23
Quiz Management System 2022-23

if(choice=='C' || choice=='c')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t8. Size of wchat_t is."<<endl;
cout<<"\tA. 2"<<endl;
cout<<"\tB. 4"<<endl;
cout<<"\tC. 2 or 4"<<endl;
cout<<"\tD. depends on number bits in system"<<endl;
choice=getch();
if(choice=='D' || choice=='d')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t9. Which of the following is "address of operator"?."<<endl;
cout<<"\tA. *"<<endl;
cout<<"\tB. &"<<endl;
cout<<"\tC. []"<<endl;
cout<<"\tD. &&"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}

Department of ISE, HKBKCE


24
Quiz Management System 2022-23

else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t10. Which of the following is "address of operator"?."<<endl;
cout<<"\tA. *"<<endl;
cout<<"\tB. &"<<endl;
cout<<"\tC. []"<<endl;
cout<<"\tD. &&"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}

cout<<"\n\n \n\n\t\t\tyour score is: \n\n\n\n"<<marks;


if(marks>6)
cout<<"\t\t\tCongratulations!!!!\n\nYOU WON THE QUIZ"<<endl;
else
cout<<"\t\t\tResult:lost :(\n\nbetter luck next time"<<endl;
}

void java(){
int marks=0;
cout<<"\t1. What is correct syntax to output \Hello World\ in
Java"<<endl;
cout<<"\tA. cout<<\*Hello World *\""<<endl;
cout<<"\tB. system.out.print(\*Hello World *\)"<<endl;
cout<<"\tC. console.writeln(\*Hello World *\) "<<endl;
cout<<"\tD. printf(\*Hello World *\)"<<endl;

Department of ISE, HKBKCE


25
Quiz Management System 2022-23

choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}

cout<<"\t2. Who is the developer of Java ?"<<endl;


cout<<"\tA. Dennis Ritchie"<<endl;
cout<<"\tB. Bjarne Stroustrup"<<endl;
cout<<"\tC. James Goslings "<<endl;
cout<<"\tD. Alfred Harry"<<endl;
choice=getch();
if(choice=='C' || choice=='c')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}

cout<<"\t 3. Number of primitive data types in Java are?"<<endl;


cout<<"\tA. 6"<<endl;
cout<<"\tB. 7"<<endl;
cout<<"\tC. 8"<<endl;
cout<<"\tD. 9"<<endl;
choice=getch();
if(choice=='C' || choice=='c')
{

Department of ISE, HKBKCE


26
Quiz Management System 2022-23

cout<<"\nYour answer is correct"<<endl;


marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 4. What is the size of float and double in java?"<<endl;
cout<<"\tA. 32 and 64"<<endl;
cout<<"\tB. 32 and 32"<<endl;
cout<<"\tC. 64 and 64"<<endl;
cout<<"\tD. 64 and 32"<<endl;
choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 5. Automatic type conversion is possible in which of the
possible cases?"<<endl;
cout<<"\tA. Byte to int"<<endl;
cout<<"\tB. int to long"<<endl;
cout<<"\tC. long to int"<<endl;
cout<<"\tD. Short to int"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{

Department of ISE, HKBKCE


27
Quiz Management System 2022-23

cout<<"\nYour answer is incorrect"<<endl;


}
cout<<"\t 6. select the valid statement."<<endl;
cout<<"\tA. char[]ch=new char(5)"<<endl;
cout<<"\tB. char[] ch=new char[5]"<<endl;
cout<<"\tC. char[] ch=new char()"<<endl;
cout<<"\tD. char[] ch=new char[]"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 7. When an array is passed to a method, what does the method
receive?"<<endl;
cout<<"\tA. The reference of the array"<<endl;
cout<<"\tB. A copy of the array"<<endl;
cout<<"\tC. Length of the array"<<endl;
cout<<"\tD. Copy of first element"<<endl;
choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 8. Select the valid statement to declare and initialize an
array"<<endl;

Department of ISE, HKBKCE


28
Quiz Management System 2022-23

cout<<"\tA. int[] A={}"<<endl;


cout<<"\tB. int[] A={1,2,3}"<<endl;
cout<<"\tC. int[] A=(1,2,3)"<<endl;
cout<<"\tD. int[][] A={1,2,3}"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 8. Arrays in java are-"<<endl;
cout<<"\tA. Object references"<<endl;
cout<<"\tB. Objects"<<endl;
cout<<"\tC. Primitive data types"<<endl;
cout<<"\tD. None"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 9. When is the Object created with a new keyword?"<<endl;
cout<<"\tA. At run time"<<endl;
cout<<"\tB. At compile time"<<endl;
cout<<"\tC. Depends on code"<<endl;
cout<<"\tD. None"<<endl;
choice=getch();

Department of ISE, HKBKCE


29
Quiz Management System 2022-23

if(choice=='A' || choice=='a')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\t 10. Identify the corrected definition of a package."<<endl;
cout<<"\tA. A package is a collection of editing tools"<<endl;
cout<<"\tB. A package is a collection of class"<<endl;
cout<<"\tC. A package is collection of classes and interfaces"<<endl;
cout<<"\tD. A package is a collection of interfaces"<<endl;
choice=getch();
if(choice=='C' || choice=='c')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}
cout<<"\n\n \n\n\t\t\tyour score is: \n\n\n\n"<<marks;
if(marks>6)
cout<<"\t\t\tCongratulations!!!!\n\nYOU WON THE QUIZ"<<endl;
else
cout<<"\t\t\tResult:lost :(\n\nbetter luck next time"<<endl;

void clang(){
int marks=0;

Department of ISE, HKBKCE


30
Quiz Management System 2022-23

cout<<"\t1.What is correct syntax to output \Hello World\ in C


Language"<<endl;
cout<<"\tA. cout<<\*Hello World *\ "<<endl;
cout<<"\tB. system.out.print(\*Hello World *\)"<<endl;
cout<<"\tC. console.writeln(\*Hello World *\) "<<endl;
cout<<"\tD. printf(\*Hello World *\)"<<endl;
choice=getch();
if(choice=='D' || choice=='d')
{
cout<<"\nYour answer is correct"<<endl;
marks++;
}
else{
cout<<"\nYour answer is incorrect"<<endl;
}

cout<<"\t2.Who is the developer of C Language?"<<endl;


cout<<"\tA. Dennis Ritchie"<<endl;
cout<<"\tB. Bjarne Stroustrup"<<endl;
cout<<"\tC. James Goslings "<<endl;
cout<<"\tD. Alfred Harry"<<endl;
choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"Your answer is correct"<<endl;
marks++;
}
else{
cout<<"Your answer is incorrect"<<endl;
}
cout<<"\t3.How is an array initialized in C language"<<endl;

Department of ISE, HKBKCE


31
Quiz Management System 2022-23

cout<<"\tA. int a[3]={1,2,3};"<<endl;


cout<<"\tB. int a={1,2,3};"<<endl;
cout<<"\tC. int a[]=new int[3] "<<endl;
cout<<"\tD. int a(3)=[1,2,3];"<<endl;
choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"Your answer is correct"<<endl;
marks++;
}
else{
cout<<"Your answer is incorrect"<<endl;
}
cout<<"\t4.How is the 3rd element in an array accessed based on pointer
notation?"<<endl;
cout<<"\tA. *a+3"<<endl;
cout<<"\tB. *(a+3)"<<endl;
cout<<"\tC. *(*a+3) "<<endl;
cout<<"\tD. &(a+3)"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"Your answer is correct"<<endl;
marks++;
}
else{
cout<<"Your answer is incorrect"<<endl;
}
cout<<"\t5.How are strings represented in memory in C? "<<endl;
cout<<"\tA. An array of characters."<<endl;
cout<<"\tB. The object of some class."<<endl;
cout<<"\tC. Same as other primitive data types. "<<endl;
cout<<"\tD. LinkedList of characters."<<endl;

Department of ISE, HKBKCE


32
Quiz Management System 2022-23

choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"Your answer is correct"<<endl;
marks++;
}
else{
cout<<"Your answer is incorrect"<<endl;
}
cout<<"\t6.What does the following declaration indicate?\n\t\t"<<endl;
cout<<"\tA. X stores a value of 8."<<endl;
cout<<"\tB. X is an 8 bit integer."<<endl;
cout<<"\tC. Both A and B "<<endl;
cout<<"\tD. None"<<endl;
choice=getch();
if(choice=='C' || choice=='c')
{
cout<<"Your answer is correct"<<endl;
marks++;
}
else{
cout<<"Your answer is incorrect"<<endl;
}
cout<<"\t7.Which of the following is exit controlled loop?"<<endl;
cout<<"\tA. While loop"<<endl;
cout<<"\tB. for loop"<<endl;
cout<<"\tC. do-while loop "<<endl;
cout<<"\tD. none"<<endl;
choice=getch();
if(choice=='C' || choice=='c')
{
cout<<"Your answer is correct"<<endl;
marks++;

Department of ISE, HKBKCE


33
Quiz Management System 2022-23

}
else{
cout<<"Your answer is incorrect"<<endl;
}
cout<<"\t8.What is the size of the data type(in bytes) in C?"<<endl;
cout<<"\tA. 4"<<endl;
cout<<"\tB. 8"<<endl;
cout<<"\tC. 2 "<<endl;
cout<<"\tD. 1"<<endl;
choice=getch();
if(choice=='A' || choice=='a')
{
cout<<"Your answer is correct"<<endl;
marks++;
}
else{
cout<<"Your answer is incorrect"<<endl;
}
cout<<"\t9.How to declare a double-pointer in C?"<<endl;
cout<<"\tA. int*val"<<endl;
cout<<"\tB. int**val"<<endl;
cout<<"\tC. int&val "<<endl;
cout<<"\tD. int*&val"<<endl;
choice=getch();
if(choice=='B' || choice=='b')
{
cout<<"Your answer is correct"<<endl;
marks++;
}
else{
cout<<"Your answer is incorrect"<<endl;
}

Department of ISE, HKBKCE


34
Quiz Management System 2022-23

cout<<"\t10.Which of the following is a not a standard header files in


C?"<<endl;
cout<<"\tA.stdio.h"<<endl;
cout<<"\tB. stdlib.h"<<endl;
cout<<"\tC. conio.h"<<endl;
cout<<"\tD. none"<<endl;
choice=getch();
if(choice=='D' || choice=='d')
{
cout<<"Your answer is correct"<<endl;
marks++;
}
else{
cout<<"Your answer is incorrect"<<endl;
}
cout<<"\n\n \n\n\t\t\tyour score is: \n\n\n\n"<<marks;
if(marks>6)
cout<<"\t\t\tCongratulations!!!!\n\nYOU WON THE QUIZ"<<endl;
else
cout<<"\t\t\tResult:lost :(\n\nbetter luck next time"<<endl;
}
void select(){
cout<<"\n\tScore less than 7 will be considered as Fail"<<endl;
cout<<"\n\tSelect which subject Quiz you want to perform"<<endl;
cout<<"1.) general " <<endl;
cout<<"2.) C++ " <<endl;
cout<<"3.) Java "<<endl;
cout<<"4.) C "<<endl;
cout<<"Enter your choice for quiz :"<<endl;
cin>>choice;
switch(choice){
case 1:
general();

Department of ISE, HKBKCE


35
Quiz Management System 2022-23

break;
case 2:
cpp();
break;
case 3:
java();
break;
case 4:
clang();
break;
default:
cout<<"\tInavlid choice ! Please Try again."<<endl;
}
}
};
int main(){
student s;
quiz z;
char press;
do{
cout<<"\n\n\t\t\t\t----------------QUIZ GAME----------------\t\t\t\t\t\n\n"<<endl;
s.getdata();
z.select();
cout<<"\n\tPress y to continue or any other key to terminate"<<endl;
press = getch();
} while( press == 'y' || press == 'Y');
return 0;
}

Department of ISE, HKBKCE


36
Quiz Management System 2022-23

CHAPTER-05

SNAPSHOTS
5.1.Opening Screen

Fig. 5.1.1 Screenshot of Opening screen

5.2.Taking Users Information

Fig. 5.2.1 Screenshot of Taking Users Information

Department of ISE, HKBKCE


37
Quiz Management System 2022-23

5.3. General Questions

Fig. 5.3.1 Screenshot of QUIZ General Questions Page

5.4.C++ Questions

Fig. 5.4.1 Screenshot of C++ Questions Page

Department of ISE, HKBKCE


38
Quiz Management System 2022-23

5.5 Java Questions

Fig. 5.5.1 Screenshot of Java Questions Page

5.6 Java Questions

Fig. 5.6.1 Screenshot of Java Questions Page

Department of ISE, HKBKCE


39
Quiz Management System 2022-23

5.7 Lost Game

Fig. 5.7.1 Screenshot of losing game Page

5.8. Pass Result

Fig. 5.8.1 Screenshot of Winning game Page

Department of ISE, HKBKCE


40
Quiz Management System 2022-23

CONCLUSTION

The Quiz Game project has been designed to handle a significant number of question
records, with all their relevant information stored in the backend file. This capability
ensures that the system can effectively manage and store a large database of questions,
providing a rich and diverse set of questions for users to engage with during gameplay.

In conclusion, the Quiz Game's capability to handle a substantial number of question


records and store their information in the backend file ensures efficient management,
scalability, and easy maintenance of the question database. This enhances the overall
functionality and user experience of the game, making it a robust and reliable choice for
quiz enthusiasts.

Department of ISE, HKBKCE


41
Quiz Management System 2022-23

REFERENCES

• https://www.w3schools.com/

• https://chat.openai.com/

• www.quizbreaker.com

• www.geeksforgeeks.org

Department of ISE, HKBKCE


42

You might also like