Question: java programming Write an application that simulates coin tossing. Write a method called toss that uses a random number to randomly choose heads or tails
java programming
Write an application that simulates coin tossing. Write a method called toss that uses a random number to randomly choose heads or tails and returns a String containing the result of the coin toss. Call this method from your main method 10 times, and calculate and display each toss as well as the percent heads and percent tails for all tosses. java CoinToss 1. heads 2. heads 3. heads 4. tails 5. heads 6. tails I. tails 8. tails 9. heads 10. heads 60% heads 40% tails hint: use Random
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
