Question
Language (C++) Objectives: Develop solutions that use class features for C++. Create *DiceRoll.h files and *DiceRoll.cpp files for classes. File one: // Specification file DiceRoll.h
Language (C++)
Objectives: Develop solutions that use class features for C++. Create *DiceRoll.h files and *DiceRoll.cpp files for classes.
File one: // Specification file "DiceRoll.h"
File two: // Implementation file "DiceRoll.cpp" for the specification file "DiceRoll.h"
File three: // Source code (main program: "TestDiceRoll.cpp" file) to test the "DiceRoll.h" class file
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 to Expert-Tailored 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