Ffinal Rreport Ad
Ffinal Rreport Ad
Final
Project Report
On
“Quiz Game”
Submitted by
By
Ayuscal Sedhai (321019)
Dharma Raj Patherkat (321025)
Project Guide
Bachelor of Information and Technology
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 guidelines provided by our Head of Department Er. Bimal
sharma.
Finally, we would like to thank 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. The C++ Quiz Game offers a valuable learning experience through
detailed explanations provided for each question. Players receive instant feedback
on their responses, along with explanations of correct answers and supplementary
information to reinforce learning. The game also provides customization options,
allowing players to tailor their quiz experience according to their preferences. They
can select specific topics, create custom quizzes, and adjust settings to suit their
learning objectives and preferences.
Overall, the C++ Quiz Game serves as an effective tool for both beginners looking
to learn C++ programming and experienced developers seeking to test and sharpen
their skills. With its engaging gameplay, comprehensive question bank, and
educational value, the game aims to make learning C++ enjoyable and rewarding
for users of all levels.
iii
TABLE OF CONTENTS
ACKNOWLEDGEMENT ................................................................................................................. ii
ABSTRACT...................................................................................................................................... iii
1.2 Objective............................................................................................................................ 1
REFERENCE.................................................................................................................................... 21
APPENDICES .................................................................................................................................. 22
v
LIST OF ABBREVIATION
C++ C Plus Plus
UI User interface
CIN Console Input
COUT Console Output
vi
LIST OF FIGURES
Figure 1: Gantt chart .............................................................................................. 13
vii
Chapter 1: Introduction
1.1 Introduction
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.2 Objective
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.4 Limitation
• 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.5 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
• 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.
2
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.
• 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.
3
• Ensure that the system meets quality standards and satisfies user
requirements before each release.
4
Chapter 2: Background Study and Literature Review
5
• Explore literature on common design patterns such as the Factory Method,
Singleton, and Observer patterns, which may be applicable to various
components of the system.
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.
6
2.2 Literature Review
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:
Educational Gaming
• Research in educational gaming explores the effectiveness of games as
learning tools and their impact on knowledge retention and engagement.
• Studies like "Game-Based Learning: Latest Evidence and Future
Directions" by Richard Van Eck provide insights into the design principles
and pedagogical considerations for educational games.
7
Game Design and Mechanics
• Literature on game design delves into mechanics, dynamics, and aesthetics
(MDA) frameworks, which are essential for creating engaging gameplay
experiences.
• Articles like "A Game Design Vocabulary" by Anna Anthropy and Naomi
Clark provide vocabulary and concepts for analyzing and discussing game
design elements.
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
• Decompose the system into modules or components based on its
functionality.
• Determine the inputs, outputs, and processing logic for each module.
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.
9
• Consider accessibility and responsiveness aspects to ensure the interface is
accessible across different devices and screen sizes.
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
• Evaluate the performance requirements of the quiz game in terms of
response time, throughput, and resource utilization.
• Identify potential performance bottlenecks and scalability issues.
Security Analysis
• Identify security threats and vulnerabilities, such as unauthorized access,
data breaches, and injection attacks.
• Define security controls and mechanisms to mitigate risks, such as
authentication, authorization, encryption, and input validation.
• Implement security best practices to protect sensitive data and ensure the
integrity and confidentiality of the system.
10
3.2 Feasibility 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
• User Experience and Acceptance: Comprehensive user have been developed
to familiarize administrators with the Content Management System (CMS)
and other functionalities. User acceptance testing has been conducted,
involving administrators and end-users.
• System Reliability and Maintenance: Regular monitoring and maintenance
protocols are established to address any issues promptly. Maintenance
procedures include regular updates, security patches, and proactive
measures to prevent system downtime. A dedicated support team is in place
to address user queries and technical issues.
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
• Cost -Benefit Analysis: Development costs, including personnel, hardware,
and software resources, have been budgeted and allocated effectively.
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.
Deployment and User Onboarding
• Deployment Schedule: The deployment schedule aligns with the academic
calendar, ensuring minimal disruption to college activities. User onboarding
and training sessions are scheduled to coincide with the software's
availability
12
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. The given below Gantt chart is a
visual representation of a project schedule that helps in planning,
coordinating, and tracking tasks over time. It consists of horizontal bars
representing individual tasks or activities, arranged along a timeline. The
length of each bar corresponds to the duration of the task, while their
positioning indicates the start and end dates.
start date: 2023-09-21 end date: 2024-03-11
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
13
Chapter 4: System Design
14
• Takes input for the index of Question to be modified.
• If valid, takes input for new Question, Options and Correct Option.
• Else, then only an error message occurs and returns to the main menu.
Step 7: Start Quiz Function
• 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.
Step 8: Load Questions from File and Start Quiz Function
• Takes input for File name.
• If file exists, then Display the Questions and Choices from file and takes
input for Correct Choice and displays correct or wrong message.
• Else, Displays Error message.
Step 9: Exit Function (Terminate the program)
15
Flowchart
start
choose
from 1-6
1 Add Question
2
Delete Question
3
Modify Question
4
Start Quiz
5
Load Question from file and start
quiz
Exit
16
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 question, starting a quiz, or loading a quiz from a file.
ions, st
5.2 Programming Languages
The implementation of the "Quiz Game" is executed using the C++ programming
language. C++ is chosen for its efficiency, flexibility, and suitability for desktop
application development.
5.3 Testing
Unit Testing
• Unit testing involves testing individual units or components of the software
in isolation.
• The goal is to verify that each unit functions correctly as per its design.
• Developers typically write unit tests using testing frameworks like JUnit (for
Java) or NUnit (for .NET).
17
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.
18
Chapter 6: Conclusion and Future Recommendations
6.1 Conclusion
The quiz game developed in C++ provides a simple functional implementation for
testing users' knowledge on various topics. Through the implementation process,
we successfully achieved the following:
Question Presentation: Questions are presented to the user with multiple-choice
options.
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.
19
Randomized Question Selection
• Incorporate randomization to select questions from the question bank,
preventing predictability and promoting replay ability.
• 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
• Allow users to choose quiz categories or topics of interest, enabling
personalized learning experiences.
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
[1]. Balagurusamy, E. (2020). Object-Oriented Programming with C++ (8th
edition). McGraw Hill
21
APPENDICES
Figure 4: Menu
22
Figure 6: Modify Questions
23
Figure 9: Exit
24