Question: In Java Need help with a coin tossing game. The game can be played solo or with up to 5 players MAX Each player is

In Java

Need help with a coin tossing game.

  • The game can be played solo or with up to 5 players MAX
  • Each player is identified by their name and the winner is displayed by their name
  • Each players beginning balance is zero
  • Each player will toss four coins, one of each penny, nickel, dime, and quarter in succession (i.e. Joes first toss (all 4 coins), Janes first toss, Joes second toss, Janes second toss, etc.)
  • If the coin lands heads-up the value of the coin is added to the users balance. If the coin lands tails-up nothing is added to the balance
    • For example, if the user toss resulted in a tails-up penny, heads-up nickel, tails-up dime and heads-up quarter $0.30 is added to the players balance
  • A player can no longer toss coins once their balance exceeds a dollar
  • The program terminates once any player reaches a dollar
  • The program displays the name of the winner and their score/amount
  • The game will repeat until the user(s) is(are) tired of playing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!