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
PayPal Gateway not configured
PayPal Gateway not configured