Objectives: • Provide a game solution using C++ language. It is important that we can use a set of C++ features to solve problem. • Develop solutions that use class features for C++. • Create "*.h"...


Objectives:<br>• Provide a game solution using C++ language. It is important that we can use a set of C++ features<br>to solve problem.<br>• Develop solutions that use class features for C++.<br>• Create

Extracted text: Objectives: • Provide a game solution using C++ language. It is important that we can use a set of C++ features to solve problem. • Develop solutions that use class features for C++. • Create "*.h" files and "*.cpp" files for classes. Description: 1. Part 1- Required Assignment: a. Write code for the class GamePurse. It has the following interface Iclass GamePurse { int purseAmount; public: GamePurse(int); void win(int); void Loose(int); int GetAmount(); }; b. Win() function will add a winning amount to the purseAmount. On the other hand, Loose function will deduct an amount from the purseAmount. GetAmount() will return the value of "purseAmount". c. Write a program that allows you to play the dice game repeatedly until the user chooses to quit. User needs to bet a positive amount to play a game. d. The output of the program may be like the following Welcome to the dice ware game. You have 100 in your game purse.
Enter a bet amount to play (0 means exit the program):<br>10<br>Your dice is 5<br>Computer dice is 3<br>You won 10 dollars!<br>Your game purse now has 110 dollars<br>Enter a bet amount to play (0 means exit the program):<br>Your dice is 4<br>Computer dice is 6<br>You lost 5<br>Your game purse now has 105 dollars<br>Enter a bet amount to play (0 means exit the program):<br>You choose to exit the program. Thank you and goodbye<br>

Extracted text: Enter a bet amount to play (0 means exit the program): 10 Your dice is 5 Computer dice is 3 You won 10 dollars! Your game purse now has 110 dollars Enter a bet amount to play (0 means exit the program): Your dice is 4 Computer dice is 6 You lost 5 Your game purse now has 105 dollars Enter a bet amount to play (0 means exit the program): You choose to exit the program. Thank you and goodbye

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here