Question: Write a Java program that displays the result of a 100-time coin tossing game, in the form like below. The ratio of faces : tails

Write a Java program that displays the result of a 100-time coin tossing game, in the form like below.

The ratio of faces : tails of a 100-time coin tossing is 58:42.

Requirements:

a) Use a random number generator for coin tossing.

b) Need count variables to record the count of faces, count of tails, and count of tosses.

c) Use a while loops in this program.

d) Your class should be named TossCoinWhile, and your source code file should be named TossCoinWhile.java

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!