Write an application that simulates coin tossing. Let the program toss the coin each time the user presses the "Toss" button. Count the number of times each side of the coin appears. Display the results. The program should call a separate method Flip that takes no arguments and returns false for tails and true for heads.
[Note: If the program realistically simulates the coin tossing, each side of the coin should appear approximately half of the time.]
Write an application that simulates coin tossing
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


VulpesRank #55 · 29.2K reputationPosted Dec 11, 2012, 1:58 PM EST
The code to be added to the Form class to toss the coin and display the results will be as follows: