Quiz Game AD1
Quiz Game AD1
A
Final
Project Report
On
“Quiz Game”
By
Ayuscal Sedhai (321019)
Dharma Raj Patherkat (321021)
February, 2024
CERTIFICATE OF APPROVAL
The Project entitled “Quiz Game”, submitted by Aushcal Shedai and Dharma Raj Patherkat
in partial fulfillment of the requirements for the degree of “Bachelor of Information and
Technology” has been accepted as a bona fide record of work carried out by them in the
department.
External
Purbanchal University
i
ACKNOWLEDGEMENT
We are very grateful to our supervisor Er. Ram Chandra Poudel for his constant
encouragement, cooperation and guiding us through this project. We would like to thank our
lecturer Er. Sunil Thapa, friends of Bachelor of Information Technology from our batch as
well as the seniors who helped us a lot.
The desired success obtained during wouldn’t have been attained without the facilities and
other guideline provided by our Head of Department Er. Bimal sharma.
At last, we would like to thank to all those individuals who directly or indirectly helped us in
the completion of this project.
ii
ABSTRACT
The quiz game in C++ is designed to entertain and challenge players with a series of
questions across different categories. The game employs object-oriented programming
principles to encapsulate questions, answers, and game mechanics.
Features:
The application incorporates essential features for Quiz Game providing users with a
seamless and intuitive and experience. Key functionalities includes:
Add Question: Users can add multiple-choice questions to the quiz along with options
and the correct answer and also whether to save or not them in files.
Delete Question: Allows users to remove questions from the quiz based on their
index.
Modify Question: Users can modify the text and answer of existing questions.
Start Quiz: Conducts the quiz, presenting questions to users one by one and
evaluating their responses.
Load Quiz: Load quizzes from previously saved files to conduct them.
iii
TABLE OF CONTENTS
CERTIFICATE OF APPROVAL........................................................................................................i
ACKNOWLEDGEMENT..................................................................................................................ii
ABSTRACT........................................................................................................................................iii
TABLE OF CONTENTS...................................................................................................................iv
LIST OF ABBREVIATION...............................................................................................................vi
LIST OF FIGURES...........................................................................................................................vii
Chapter 1: Introduction......................................................................................................................1
1.1 Introduction:........................................................................................................................1
1.2 Objective:.............................................................................................................................1
1.3 Scope:.........................................................................................................................................1
1.3 Limitation:...........................................................................................................................1
1.6 Schedule:....................................................................................................................................4
Chapter 2: Background Study and Literature Review.....................................................................5
2.1 Background Study:...................................................................................................................5
2.2 Literature Review:....................................................................................................................6
Chapter 3: System Analysis................................................................................................................9
3.1 Requirement Analysis:..............................................................................................................9
1.2 Feasibility Analysis:...........................................................................................................11
Chapter 4: System Design.................................................................................................................13
4.1 Algorithm Details:...................................................................................................................13
4.2 Flowchart:....................................................................................................................................15
Chapter 5: Implementation and Testing..........................................................................................17
5.1 Implementation:......................................................................................................................17
5.2 Testing:.....................................................................................................................................17
5.3 Result Analysis:.......................................................................................................................19
Chapter 6: Conclusion and Future Recommendations..................................................................20
6.1 Conclusion:..............................................................................................................................20
6.2 Future Recommendations:.....................................................................................................20
REFERENCE....................................................................................................................................22
APPENDICES...................................................................................................................................23
iv
v
LIST OF ABBREVIATION
vi
LIST OF FIGURES
vii
Chapter 1: Introduction
1.1Introduction:
The Quiz Management System is designed to facilitate the creation, modification,
deletion, and administration of quizzes. It allows users to add multiple-choice questions
(MCQs), store them in files, load quizzes from files, and conduct quizzes with scoring.
1.2Objective:
The project is with the main aim of meeting the following objectives:
To Create a user-friendly interface for managing quizzes.
To Enable the addition, deletion, and modification of questions.
To Provide functionality to save and load quizzes from files.
To Conduct quizzes and evaluate user responses.
1.3 Scope:
Ability to add, delete, modify, and start a quiz: The program allows users to
perform various operations such as adding, deleting, and modifying quiz
questions. It also allows users to start a quiz and answer the questions.
Multiple choice questions: The program supports multiple-choice questions where
users can select one option from a set of choices.
Saving and loading quizzes: The program can save quiz questions to a file and
load them back for later use.
Object-oriented design: The program uses classes and inheritance to organize and
manage quiz-related functionality, which makes it easier to extend and maintain.
User interaction: The program interacts with users through a command-line
interface, allowing them to input questions, choices, and answers.
1.3Limitation:
Lack of error handling: The program lacks robust error handling mechanisms.
For example, it does not handle cases where users input invalid data or encounter
file I/O errors.
1
Limited question types: The program only supports multiple-choice questions. It
does not support other question types such as true/false questions, fill-in-the-
blank, or open-ended questions.
No user authentication or security: The program does not have any user
authentication mechanisms, so anyone with access to the program can add,
modify, or delete quiz questions.
Limited scalability: The program has a fixed limit on the maximum number of
questions (MAX_QUESTIONS), which may restrict its scalability for large
quizzes.
Limited file format: The program saves quiz questions to a file in a specific
format, which may not be compatible with other quiz software or platforms.
1.4 Methodology:
When developing a quiz game in C++, it's essential to follow a structured development
methodology to ensure efficiency, maintainability, and the successful completion of the
project. Here's a general outline of a development methodology suitable for creating a
quiz game in C++:
Planning Phase:
Identify project requirements, objectives, and features.
Define the scope of the project, including the user interface, functionality, and
technology stack.
Create a high-level project plan outlining the development timeline and
milestones.
Iterative Development:
Iteration 1: Focus on designing the class structure and implementing basic
functionality for adding, deleting, and modifying quiz questions.
Iteration 2: Develop quiz administration features, including starting quizzes,
providing feedback, and handling user responses.
Iteration 3: Add support for saving and loading quizzes from files, ensuring data
persistence and portability.
2
Iteration 4: Implement additional features such as user authentication, support for
different question types, and scalability enhancements.
Incremental Development:
Each iteration builds upon the previous one, adding new features and refining
existing functionality.
Incremental releases are made at the end of each iteration, allowing stakeholders
to review progress and provide feedback.
Each release should be tested thoroughly to ensure reliability, usability, and
adherence to requirements.
Continuous Improvement:
Gather feedback from stakeholders and end-users after each iteration to identify
areas for improvement.
Use feedback to prioritize and plan subsequent iterations, focusing on addressing
user needs and enhancing system functionality.
Regularly review and update project documentation to reflect changes and
improvements made during development.
Testing and Quality Assurance:
Conduct comprehensive testing throughout the development process to identify
and address defects early.
Use a combination of unit tests, integration tests, and user acceptance tests to
validate system functionality and performance.
Ensure that the system meets quality standards and satisfies user requirements
before each release.
Deployment and Maintenance:
Deploy the system to production or staging environments after completing all
iterations and testing.
Provide user training and support to ensure smooth adoption and usage of the
system.
Establish processes for ongoing maintenance, bug fixes, and updates to address
any issues that arise post-deployment.
3
1.6 Schedule:
WEEK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Research about
previous project
Literal Review
Prepare Proposal
& Flowchart
Coding Starts
Complete oop
Part
Complete File
Handling
Coding
Completed
Report start &
complete
Project complete
4
Chapter 2: Background Study and Literature Review
5
File Handling and Data Persistence:
Study file handling techniques and data persistence mechanisms in programming
languages like C++ to implement features for saving and loading quizzes from
files.
Review literature on file I/O best practices, error handling strategies, and data
serialization techniques to ensure robustness and reliability.
Software Testing and Quality Assurance:
Explore literature on software testing methodologies, including unit testing,
integration testing, and user acceptance testing, to ensure the quality and
reliability of the Quiz Management System.
Review research papers and articles on software quality assurance practices, test-
driven development (TDD), and continuous integration (CI) to incorporate best
practices into the development process.
Scalability and Performance Optimization:
Study techniques for optimizing system performance and scalability to ensure the
Quiz Management System can handle a large number of users and quizzes.
Review literature on scalability patterns, caching strategies, and database
optimization techniques to design a scalable and efficient system architecture.
By studying the background of quiz game development in C++, developers can gain
valuable insights into the principles, techniques, and considerations involved in creating
effective and engaging educational gaming experiences. This knowledge serves as a
foundation for designing and implementing quiz games that meet the needs and
expectations of users while leveraging the capabilities of the C++ programming language.
A literature review of quiz games developed in C++ provides insights into existing
research, methodologies, and implementations in the field. While formal academic
literature on this specific topic may be limited, various resources, including articles,
tutorials, and forums, contribute to understanding the development of quiz games in C++.
Here's a literature review highlighting key points:
6
Game Development in C++:
Educational Gaming:
7
By conducting a literature review encompassing these areas, developers gain a
comprehensive understanding of the principles, techniques, and resources available for
developing quiz games in C++. This knowledge informs the design and implementation
process, helping to create engaging and effective educational gaming experiences.
8
Chapter 3: System Analysis
System analysis of a quiz game developed in C++ involves examining the requirements,
functionality, and architecture of the system. Here's a breakdown of the system analysis:
Functional Analysis:
Data Analysis:
Identify the data entities involved in the quiz game, such as users, questions,
quizzes, scores, and settings.
Design the data schema and relationships between entities, considering data
integrity and efficiency.
Determine data storage requirements and decide whether to use file-based storage,
databases, or other mechanisms.
Analyze the user interface design requirements based on usability principles and
user expectations.
Define the layout, navigation flow, and visual elements of the user interface.
Consider accessibility and responsiveness aspects to ensure the interface is
accessible across different devices and screen sizes.
9
Architectural Analysis:
Select an appropriate architectural style for the quiz game, such as client-server,
peer-to-peer, or monolithic architecture.
Define the high-level architecture of the system, including components, layers,
and interactions.
Consider scalability, maintainability, and extensibility factors when designing the
architecture.
Performance Analysis:
Security Analysis:
10
1.2Feasibility Analysis:
For a Personal note tracker developed in C++, conducting a feasibility analysis is crucial
to assess whether the project can be executed successfully. This analysis comprises four
key aspects: technical, operational, economic, and schedule feasibility.
Technical Feasibility:
Compatibility tests have been conducted, and the system successfully operates on the
identified hardware.
Programming Language and Tools: C++ is a suitable choice for the project, as it
provides the necessary capabilities for backend development. However, the
availability of appropriate development tools and libraries for C++ should be
verified.
Development Skills: Determine whether the project team, particularly beginners,
possesses or can acquire the required C++ programming skills and knowledge.
Consider whether there is access to learning resources and support for skill
development.
Platform Compatibility: Ensure that the chosen development platform (e.g.,
Windows, Linux) is compatible with C++ and provides the necessary development
environment.
Operational Feasibility:
11
User Support: Plan for user support and assistance, may encounter difficulties
while using the platform. Provide clear documentation or help resources. A
dedicated support team is in place to address user queries and technical issues.
Economic Feasibility:
Schedule Feasibility:
This project is finished under 15 weeks and we have Break down the development
process into Manageable Phases to make out project efficient and the availability
of team members.
Development Timeline:
Project Milestones: Clear project milestones and timelines have been established,
encompassing development, testing, and deployment phases. Regular progress
assessments are conducted to ensure adherence to the schedule.
12
Chapter 4: System Design
Step 1: Start
Display menu for Adding Questions, Delete Questions, Modify Question, Start
Quiz, Load Questions from File and Start Quiz, and Exit.
Takes input for Users choice for menu.
Depending on the choice, redirect to the respective functions(Adding Questions,
Delete Questions, Modify Question, Start Quiz, Load Questions from File and
Start Quiz, and Exit).
13
If valid, takes input for new Question, Options and Correct Option.
Else, then only an error message occurs and returns to the main menu.
Display the added Questions, and Options and takes input for Correct Choices
If valid, then displays Correct Answer message.
Else, then display Wrong Answer message.
14
4.2 Flowchart:
start
1.Login
2.Register
Read choice
choice
15
Chapter 5: Implementation and Testing
5.1 Implementation:
The system is implemented in C++ programming language.
Object-oriented programming principles are used for designing classes and
inheritance.
The program consists of three main classes: Question, Mcq, and Quiz.
The Question class is an abstract base class representing a general question. It
contains virtual functions to set up and retrieve question text and answer.
The Mcq (Multiple Choice Question) class is derived from the Question class and
represents a multiple-choice question. It includes additional member variables to
store choices and the correct choice index.
The Quiz class manages a collection of questions and provides functionalities to
add, delete, modify questions, and conduct quiz sessions.
Questions are stored in an array within the Quiz class.
The program provides a menu-driven interface for users to interact with the
system. Users can select options to perform various operations like adding,
deleting, modifying questions, starting a quiz, or loading a quiz from a file.
Programming Languages:
The implementation of the "Quiz Game" was executed using the C++ programming
language. C++ was chosen for its efficiency, flexibility, and suitability for desktop
application development.
5.2 Testing:
Unit Testing:
16
Integration Testing:
System Testing:
System testing evaluates the behavior of the entire software system as a whole.
It verifies that the software meets its specified requirements and functions
correctly in its intended environment.
System testing may include functional testing, performance testing, security
testing, and other types of testing to assess overall system quality.
Acceptance Testing:
Acceptance testing validates whether the software meets the acceptance criteria
defined by stakeholders or end-users.
It verifies that the software fulfills business requirements and is ready for
deployment.
Acceptance testing can be conducted by users, clients, or quality assurance teams,
and it may involve different approaches like alpha testing, beta testing, or user
acceptance testing (UAT).
GUI Testing:
GUI (Graphical User Interface) testing focuses on testing the graphical elements
and user interactions of the software application.
17
It verifies that the user interface behaves as expected, including elements like
buttons, menus, forms, and dialog boxes.
GUI testing tools like Selenium, Test Complete, or Ranorex automate interactions
with the user interface to perform validation and regression testing.
Regression Testing:
18
Chapter 6: Conclusion and Future Recommendations
6.1 Conclusion:
The quiz game developed in C++ provides a simple yet functional implementation for
testing users' knowledge on various topics. Through the implementation process, we
successfully achieved the following:
Answer Validation: User answers are validated against the correct answer, and feedback
is provided accordingly.
Scoring System: A scoring system calculates the user's score based on correct answers.
User Interaction: The game interacts with the user through the console, prompting for
input and displaying feedback.
Question Loading: Questions are loaded from a hardcoded array, demonstrating the
ability to expand the question bank.
Enhance the user interface with graphics, animations, and sound effects to create a
more engaging experience.
Implement a responsive and visually appealing design that adapts well to different
screen sizes and resolutions.
19
Ensure that each quiz session offers a unique set of questions to keep users
interested.
Timer Feature:
Introduce a timer feature to limit the time users have to answer each question,
adding a sense of urgency and challenge.
Allow users to customize the duration of the timer or disable it for a more relaxed
gameplay experience.
Category Selection:
By incorporating these future enhancements, the quiz game developed in C++ can evolve
into a more immersive, customizable, and educational experience, catering to a wider
audience and fostering continuous engagement and learning.
20
REFERENCE
Book:
[1].Object-Oriented Programming with C++, By E Balagurusamy.
Online Tutorials and Resources:
[2].Websites like Tutorialspoint, and CPlusPlus.com offer C++ tutorials and resources.
[3].YouTube channels such as CodeCourse provide video tutorials on C++ programming.
21
APPENDICES
22