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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!