PF Term Project
PF Term Project
PF-Special-Section
CC-112L
Programming Fundamentals
Page 0 of 4
Programming Fundamentals (CC-112L )
Instructions:
• This is an individual assignment. Absolutely NO collaboration is allowed. Any traces of
plagiarism/cheating would result in an “F” grade in this course.
• Do NOT copy even a single line of code from any other person or book or Internet or any other source.
• You have to complete this Project Tasks within the Deadline. Late submission will result in 0 Marks.
Project Title:
Hangman Game with User Registration and Game Record
Storage
Page 1 of 4
Project Instructions:
You are tasked with developing a Hangman game in C++ with additional features including user
registration and login functionality, as well as storing game records in a file. The game should utilize file
handling for user data and game records. The score for each game should be calculated based on the
number of tries the player took to guess the word.
Requirements:
1. User Registration and Login:
o Users should be able to register with a unique username and password.
o Existing users should be able to log in with their username and password.
2. Gameplay:
o The game should be implemented using the Hangman concept.
o The game should choose a random word from a predefined list of words stored in a file
named "words.txt".
o The player should be able to guess letters to uncover the secret word.
o The player should have a maximum number of tries equals to 6 to guess the word.
o The game should display the current state of the guessed word after each guess.
o If the player guesses all the letters correctly within the maximum number of tries, they
win the game. Otherwise, they lose.
Page 2 of 4
3. Scoring:
o The score for each game should be calculated based on the number of tries the player
took to guess the word.
o The score can be calculated as the difference between the maximum number of tries and
the actual number of tries taken by the player.
o Example1: If user guessed the word in 4 tries out of 6 then the score is 2.
o After each game, the game record should be stored in a file named "game_records.txt".
Guidelines:
1. File Handling:
o Use file handling operations to read/write user registration data, word list, and game
records. Make sure to open the file in the mode that suites the functionality described in
above requirements.
o Ensure error handling for file operations (e.g., file not found, permission issues).
2. Modular Programming:
o Divide the code into appropriate functions for user registration, login, gameplay, scoring,
and file handling.
Page 3 of 4
3. User Interface:
o Design a user-friendly interface (Well Formatted Console Game) for registration, login, and
gameplay.
o After each game user will be given options to quit or play again. If user wants to play
again the clear the console and restart the game. If user quits then the program should
end.
4. Error Handling:
o Implement robust error handling mechanisms for user inputs and file operations.
o Provide informative error messages for users in case of invalid inputs or file-related errors.
5. Code Documentation:
o Document the code thoroughly using comments to explain the purpose of each function,
variable, and code block.
6. Testing:
o Perform both positive and negative testing scenarios to validate user registration, login,
gameplay, and file handling functionalities.
7. Submission:
o Submit the project source code files along with necessary input files (e.g., words.txt,
users.txt) and output files (e.g., game_records.txt).
o Include a README file (ReadMe.txt) with instructions on how to compile and run the
program, as well as any additional information about the project.
o Zip all above files in a folder and name it “BSEF23M001-PROJECT”. Submit this Zip
File on google Classroom.
Additional Notes:
• Code Optimization: Optimize the code for efficiency and readability, while avoiding unnecessary
complexity.
By following these requirements and guidelines, you can create a comprehensive and well-structured
Hangman game project with user registration and game record storage functionality. For any Query refer
to your Book. Do this project yourself because a tough viva will be taken for this Project Evaluation and
any traces of Cheating will result in 0 Marks.
BEST OF LUCK
Page 4 of 4