Question
Objectives: Develop solutions that use class features for C++. Create *.h files and *.cpp files for classes. Lab Assignment: Create a dice war game where
Objectives: Develop solutions that use class features for C++. Create *.h files and *.cpp files for classes.
Lab Assignment:
Create a dice war game where the user will play against the computer. For each game a dice is rolled for the user and another dice is rolled for the computer. Then the points will be compared, and game result will be determined for user: a win, a loss or a tie. Then the program will ask if the user wants to play again.
Output:
/******************************************************/
Welcome to the dice war game
-Your dice was rolled and it has a value of 6
-Computer dice was rolled and it has a value of 4
-You are the winner of this game.
Would you like to play again?
1 Play again
2- Quit
/******************************************************/
Note: You need to test the program by playing several times.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started