Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the Die class created in Chapter 4, create an application that implements a simple dice game that a user can play against the computer.

Using the Die class created in Chapter 4, create an application that implements a simple dice game that a user can play against the computer. The object of the game is to be the first to score 100 points after repeatedly rolling 2 dice. The program asks the user for a number between 2(the lowest possible total from rolling 2 dice) and 12 (the highest total possible). The user rolls 2 dice up to 3 times. If the number chosen by the user comes up, the user wins 5 points. If the number does not come up within 3 rolls, the computer wins 3 points. The program should display weather the user or computer wins the game.

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 Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

Discuss the importance of linking pay to ethical behavior.

Answered: 1 week ago