Using Java create a craps game prompting users to play bets, tracking win / lose records. keeping track of bet winnings and losses. if user doesn't have enough money to continue bets end game. The craps game has to follow these conditions, also prompt user to initiate each roll. after each game user can choose to continue or quit game. when game ends user receive win / loss stats and money earn or lost stats. When the program is run, it will prompt the player for the starting balance of their account (in dollars). At the start of each game, the player will be asked for their bet. The bet must be at least $1, but cannot exceed the balance of their account. During the game, the outcome of each roll must be output to the display. When the outcome of the game is decided, the account balance must be updated accordingly based on the player’s bet. If the player wins, the amount of the bet is added to the account balance; if the player loses, the account balance is decreased by the bet amount. At the conclusion of the session, the program will output the following information before terminating: Number of games played Percentage of games won and lost Current account balance Percentage increase or decrease in account balance since the session began     sample output   Example Game Output (yours may vary): Do you wish to play another game?  y Please input your bet for the game >> $100 Invalid bet – Your balance is only:  $50 Please input your bet for the game >> $25   Sadly, you are no longer eligible to play Your ending account balance is: $ 0.00 Your starting balance has decreased by $200.00 (-100%) Of the 10 games played, you have won 3 games (30.0 %) and lost 7 games (70.0 %)   Buh, bye – Get more $$ and play again soon!

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question
100%

Using Java create a craps game prompting users to play bets, tracking win / lose records. keeping track of bet winnings and losses. if user doesn't have enough money to continue bets end game. The craps game has to follow these conditions, also prompt user to initiate each roll. after each game user can choose to continue or quit game. when game ends user receive win / loss stats and money earn or lost stats.

  • When the program is run, it will prompt the player for the starting balance of their account (in dollars).
  • At the start of each game, the player will be asked for their bet. The bet must be at least $1, but cannot exceed the balance of their account.
  • During the game, the outcome of each roll must be output to the display.
  • When the outcome of the game is decided, the account balance must be updated accordingly based on the player’s bet. If the player wins, the amount of the bet is added to the account balance; if the player loses, the account balance is decreased by the bet amount.
  • At the conclusion of the session, the program will output the following information before terminating:
    • Number of games played
    • Percentage of games won and lost
    • Current account balance
    • Percentage increase or decrease in account balance since the session began
  •  

 

sample output

 

Example Game Output (yours may vary):

Do you wish to play another game?  y

Please input your bet for the game >> $100

Invalid bet – Your balance is only:  $50

Please input your bet for the game >> $25

 

Sadly, you are no longer eligible to play

Your ending account balance is: $ 0.00

Your starting balance has decreased by $200.00 (-100%)

Of the 10 games played, you have won 3 games (30.0 %) and lost 7 games (70.0 %)

 

Buh, bye – Get more $$ and play again soon!

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Windows
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,