ICT Lab Project Fall 2024
ICT Lab Project Fall 2024
Instructions
You must do this project in a group of 2 students.
Use only those concepts that are covered in your course.
Avoid using arrays and object-oriented programming (OOP).
Submit a hardcopy(print) of your project report (1 report for each group) at the time of evaluation.
Make a folder named your Roll Nos and paste the following documents into it:
o .cpp file
o Text file containing complete code of your
o Output text file (score.txt)
o Project Report
And submit it to Google Classroom.
Problem Statement
Develop a C++ program that implements a challenging Number Guessing Game with
dynamic difficulty. The program allows the player to guess a randomly generated number within a
specified range, provides detailed feedback on how close the guess is, and includes multiple difficulty
levels and a hint feature. The program should avoid using arrays and object-oriented programming
(OOP).
Game Overview:
In this advanced version of the Number Guessing Game, the program randomly selects a number within a
dynamically set range, based on difficulty level. The player receives feedback on each guess, with hints
available to help narrow down the correct answer. The objective is for the player to guess the number in as
few attempts as possible.
Page 1 of 4
1. Setup:
The player selects a difficulty level (Easy, Medium, Hard), which affects the number
range and allowed attempts:
Easy: Range 1-50, 12 attempts
Medium: Range 1-100, 10 attempts
Hard: Range 1-200, 8 attempts
The program generates a random target number within the selected range using rand().
2. Hint System:
The player has the option to request a hint, which provides an additional clue based
on their previous guess:
Hints reveal whether the target number is odd/even or if it lies in the upper/lower
half of the range.
Each hint request deducts one attempt from the total allowed attempts.
3. Feedback on Guesses:
After each guess, the program calculates the difference between the guessed number
and the target, providing feedback based on this difference:
Exact Match (0): "Correct! You’ve guessed the number."
Very Far (difference > 40): "Way off."
Far (difference between 20 and 40): "Still quite far."
Close (difference between 10 and 20): "You're getting close!"
Very Close (difference < 10): "Almost there!"
If the guess is incorrect, the program also indicates whether the target is higher or
lower.
5. Scoring System:
Players are scored based on attempts remaining:
Bonus for Remaining Attempts: Each unused attempt adds 10 points to the
final score.
Hint Penalty: Each hint request deducts 5 points from the total score.
Display the player’s final score at the end of the game.
6. Input Validation:
Ensure that guesses fall within the selected range.
If the player’s guess is out of range, prompt them to enter a valid number.
Objectives
Apply basic concepts of Programming
Develop Problem-Solving Skills
Gain Experience with Dynamic User Interaction
Implement File Handling
Strengthen Algorithmic Thinking
Understand Input Validation and Error Handling
Explore Modular Design
Experience Project Planning and Documentation
Deliverables
2. Solution Comparison:
Compare methods based on ease of implementation and code clarity, justifying the
choice of approach.
6. Management Plan:
Page 3 of 4
Prepare a plan to complete the project successfully, including a flowchart with
program flow, input requirements, and output details.
7. Implementation Schedule:
Outline a schedule for each part of the game, such as difficulty setup, random number
generation, feedback, and scoring.
8. Team Roles:
If working in a team, describe each member’s role and tasks they completed.
9. Project Report:
Create a detailed report summarizing the game’s design, testing outcomes, and key
insights.
Page 4 of 4