0% found this document useful (0 votes)
8 views32 pages

Ffinal Rreport Ad

Uploaded by

Ayuscal Sedhai
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)
8 views32 pages

Ffinal Rreport Ad

Uploaded by

Ayuscal Sedhai
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/ 32

PURBANCHAL UNIVERSITY

HIMALAYAN WHITEHOUSE INTERNATIONAL COLLEGE


PUTALISADAK,
KATHMANDUA

Final
Project Report
On
“Quiz Game”
Submitted by
By
Ayuscal Sedhai (321019)
Dharma Raj Patherkat (321025)

SUBMITTED TO THE DEPARTMENT OF SCIENCE AND


TECHNOLOGY IN PARTIAL FULFILLMENT OF THE
REQUIREMENTS FOR THE DEGREE OF BACHELOR OF
INFORMATION AND TECHNOLOGY

DEPARTMENT OF SCIENCE AND TECHNOLOGY


Kathmandu, Nepal
March, 2024
CERTIFICATE OF APPROVAL
The Project entitled “Quiz Game”, submitted by Ayuscal Sedhai 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.

Supervisor, Er. Ram Chandra Poudel

Project Guide
Bachelor of Information and Technology

Er. Bimal sharma


Head of Department
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

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.2 Objective............................................................................................................................ 1

1.3 Scope ................................................................................................................................. 1

1.4 Limitation .......................................................................................................................... 1

Chapter 2: Background Study and Literature Review ......................................................................... 5

2.1 Background Study.............................................................................................................. 5

2.2 Literature Review .............................................................................................................. 7

Chapter 3: System Analysis................................................................................................................. 9

3.1 Requirement Analysis........................................................................................................ 9

3.2 Feasibility Analysis ......................................................................................................... 11

Chapter 4: System Design ................................................................................................................. 14

4.1 Algorithm Details ............................................................................................................ 14

Chapter 5: Implementation and Testing ............................................................................................. 17

5.1 Implementation ................................................................................................................ 17

5.2 Programming Languages ................................................................................................. 17

5.3 Testing ............................................................................................................................. 17

5.4 Result Analysis ................................................................................................................ 18

Chapter 6: Conclusion and Future Recommendations ...................................................................... 19

6.1 Conclusion ....................................................................................................................... 19


iv
6.2 Future Recommendations ................................................................................................ 19

REFERENCE.................................................................................................................................... 21

APPENDICES .................................................................................................................................. 22

v
LIST OF ABBREVIATION
C++ C Plus Plus

MCQ Multiple Choice Question


OOP Object Oriented Programming

UI User interface
CIN Console Input
COUT Console Output

vi
LIST OF FIGURES
Figure 1: Gantt chart .............................................................................................. 13

Figure 2: Flow chart ............................................................................................... 16

Figure 3: Add Question .......................................................................................... 22

Figure 4: Menu ....................................................................................................... 22

Figure 5: Delete Question ...................................................................................... 22

Figure 6: Modify Question .....................................................................................23

Figure 7: Start Quiz............................................................................................... 23

Figure 8: Load Quiz .............................................................................................. 23

Figure 9: Exit ......................................................................................................... 24

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

• 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.

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.

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.

3
• 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.

4
Chapter 2: Background Study and Literature Review

2.1 Background Study


The development of quiz games in C++ aligns with the broader context of
educational gaming and software development. Here's a breakdown of the
background study regarding quiz games in C++:

Existing Quiz Management Systems


• Research and review existing quiz management systems available in
educational institutions, online learning platforms, and training programs.
• Analyze their features, functionality, user interface design, and scalability.

• Identify strengths, weaknesses, and areas for improvement based on user


feedback and reviews.
Educational Technology and Learning Management Systems (LMS)
• Explore literature on educational technology and learning management
systems (LMS) to understand the broader context of online assessments and
quizzes.
• Review research papers, articles, and case studies on the use of quizzes for
educational purposes, including their effectiveness in assessing learning
outcomes and engaging students.
User Interface Design and User Experience (UI/UX)
• Study principles of user interface design and user experience (UI/UX) to
ensure the Quiz Management System provides a seamless and intuitive user
experience.
• Review literature on UI/UX best practices, usability testing methodologies,
and user-centered design approaches.
Object-Oriented Programming (OOP) and Design Patterns
• Refresh knowledge of object-oriented programming (OOP) concepts and
design patterns, as they are essential for designing and implementing the
system's class structure.

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:

Game Development in C++


• Numerous resources discuss game development in C++, covering topics
such as graphics rendering, input handling, game loops, and memory
management.
• Books like "Beginning C++ Game Programming" by Michael Dawson and
"SFML Game Development" by Jan Haller, Henrik Vogelius Hansson, and
Artur Moreira provide comprehensive guides to developing games in C++
using different libraries and frameworks.

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.

User Interface Design


• Resources on user interface design cover principles of usability,
accessibility, and user experience (UX) design, applicable to quiz games
developed in C++.
• Books such as "The Design of Everyday Things" by Don Norman and
"Don't Make Me Think" by Steve Krug offer valuable insights into
designing intuitive and user-friendly interfaces.

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.

Open-Source Projects and Code Repositories


• Exploring open-source projects and code repositories on platforms like
GitHub can offer insights into real-world implementations of quiz games in
C++.
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:

3.1 Requirement Analysis


• Identify the functional requirements of the quiz game, such as user
registration, quiz creation, question management, scoring, and result
display.
• Define non-functional requirements including performance, scalability,
security, and usability aspects.
• Gather user stories or use cases to understand how different actors interact
with the system.

Functional Analysis
• Decompose the system into modules or components based on its
functionality.
• Determine the inputs, outputs, and processing logic for each module.

• Define the interactions and dependencies between modules to ensure proper


coordination during execution.

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.

User Interface Analysis


• 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.

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.

• Define performance metrics and conduct performance testing to ensure the


system meets the specified criteria.

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.

By conducting a thorough system analysis, developers can gain a clear


understanding of the requirements, functionality, and architecture of the quiz game
developed in C++. This analysis serves as a foundation for the design,
implementation, and testing phases of the development process, ensuring the
successful delivery of a high-quality and effective 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

Figure 1: Gannt Chart

13
Chapter 4: System Design

4.1 Algorithm Details


Step 1: Start
Step 2: Main Function
• Initialize necessary variables and data structures:
• Define structures/classes for User, Quiz Category, Question and Answer
(Choices).
• proceed to the Main Menu.
Step 3: Menu Page Function
• 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).
Step 4: Add Questions Function
• Takes input for number of Questions.
• Takes input for Questions, Choices/Options and Correct Choices
• Takes input with User whether to Save or not the Questions and Choices in
file.
• If N/n presses, return to menu.
• If Y/y presses, takes input for file name to saved.
Step 5: Delete Questions Function
• Takes input for the index of Questions to Delete.
• If index is valid, Question of that index will be Deleted.
• Else, then only an error message occurs and returns to the main menu.
Step 6: Modify Questions Function

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

Figure 2: Flow Chart

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.

5.4 Result Analysis


Detailed analysis of test results revealed a robust implementation with successful
unit and system testing outcomes.
• Reviewing outcomes of unit and system.
• Identifying any failed tests, discrepancies, or defects.
• Prioritizing issues for resolution based on severity and impact.
• Ensuring the software meets requirements, performs reliably, and provides
a satisfactory user experience.

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.

6.2 Future Recommendations


While the current implementation fulfills the project's primary objectives, there are
avenues for future enhancements and feature additions: Future recommendations
for enhancing the quiz game developed in C++ include:

User Interface Improvements


• 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
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.

Multiple Difficulty Levels


• Implement multiple difficulty levels for quizzes, offering a range of
challenges suitable for different skill levels.
• Adjust factors such as question complexity, time limits, and scoring
mechanics based on the selected difficulty level.

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 3: Add Questions

Figure 4: Menu

Figure 5: Delete Questions

22
Figure 6: Modify Questions

Figure 7: Start Quiz

Figure 8: Load Questions from File and Start Quiz

23
Figure 9: Exit

24

You might also like