Course Solutions Uncategorized (Solved) : Need Modify Java Program Wrote Need Seperate Coin Flip 3 Classes Simulate Provides Toss Co Q26491053 . . . .

(Solved) : Need Modify Java Program Wrote Need Seperate Coin Flip 3 Classes Simulate Provides Toss Co Q26491053 . . . .

 

Need to modify this Java program i wrote. I need to to seperatethis coin flip into 3 classes. Simulate (provides toss counttimes), coin (coin toss) and driver (main method)

import java.util.Random;

public class Coin {
   public static intheadsCount=0,tailsCount=0,NoofHeads,NoofTails,num=0; //staticvariable for use in both of the coinToss class and the tossmethod
   public static void main(String[] args) {
        int n=20; //n is numberof toss
        for(int i=0;i<n;i++)//loop runs ten time and calls toss method to generate random headsand tails
           toss(n);//toss method to generate heads and tails
        NoofHeads=headsCount;//assign the No of heads
        NoofTails=tailsCount;//assign the No of tails
       headsCount=headsCount*100/20; //for calculate the percent ofheads
       tailsCount=tailsCount*100/20; //for calculate the

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post