Java Programming Language 1 Tossing Coins Dollar Assignment Create Game Program Using Coin Q43876963
Java programming language!
1. Tossing Coins for a Dollar
For this assignment you will create a game program using theCoin class from Programming Challenge 12. The program should havethree instances of the Coin class: one representing a quarter, onerepresenting a dime, and one representing a nickel.
When the game begins, your starting balance is $0. During eachround of the game, the program will toss the simulated coins. Whena coin is tossed, the value of the coin is added to your balance ifit lands heads-up. For example, if the quarter lands heads-up, 25cents is added to your balance. Nothing is added to your balancefor coins that land tails-up. The game is over when your balancereaches one dollar or more. If your balance is exactly one dollar,you win the game. You lose if your balance exceeds onedollar.
Expert Answer
Answer to Java programming language! 1. Tossing Coins for a Dollar For this assignment you will create a game program using the Co…
OR