Exercise the Coin class using a driver class in which 5 coins are flipped, as a group, 1024 times. Display the number of times exactly 4 tails are obtained. Display the number of times exactly 5 tails are obtained. Use an array of Coin.
Mark Do wrote:I know how to make a coin class with a Heads and Tails, but I dont know how to make 5 coins all at once.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Life is full of choices. Sometimes you make the good ones, and sometimes you have to kill all the witnesses.
Mark Do wrote:I'm still a bit confuse as how to how to make an array of coins?
Is it just something like this? ...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Mark Do wrote:So, I want to create a fair coin with heads and tails.
I want to put 5 coins into an array and toss them 1024 times.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Mark Do wrote:I want to toss 5 coins as a group
Life is full of choices. Sometimes you make the good ones, and sometimes you have to kill all the witnesses.
Mark Do wrote:I want to toss 5 coins as a group
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Life is full of choices. Sometimes you make the good ones, and sometimes you have to kill all the witnesses.
Mark Do wrote:Ok.......I cant still seem to figure out how or where to put the for loop so that the whole array will loop 1024 times! someone help! thanks!
Life is full of choices. Sometimes you make the good ones, and sometimes you have to kill all the witnesses.
Mark Do wrote:Im stuck and really confused!
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Mark Do wrote:Thanks Winston......Following your advise, here is what Ive done with my CoinAarray.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Mark Do wrote:Help please!
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here