Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions