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: 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!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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:

  • 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 2 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education