Using Java, I need help with a homework assignment. This game can be played alone or up to five players, each is identified with their
Using Java, I need help with a homework assignment.
This game can be played alone or up to five players, each is identified with their name. The player's starting balance is zero, each player will toss four coins, one of each penny, nickel, dime, and quarter in succession. 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 game will repeat until the user(s) is(are) tired of playing.
Requirements:
1. The program will contain at least 2 classes.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started