In this tutorial, I will use a mix and match of static and non-static methods to complete the results of the all-important coin flipping study. Here is a quick refresher from my Introduction to the Static Modifier tutorial.
Suppose we just won a multi-million dollar grant for a really important government study to determine if a there really is a 50/50 chance that a coin will land on either heads or tails. The specs for the grant require a minimum of 1,000,000 flips of a coin to be performed. The best approach will be to hire a bunch of people to flip coins and press either a heads button or tails button depending on the result of the flip. We'll need a high-tech workstation (table, chair, coin, heads button, tails button) for every worker that will connect to a central computer that will tally two competing values – heads and tails.