public void increment()
{
}
public int tally()
{
}
public class Counter{
private final String name;
private int count;
public Counter(String name){
this.name = name;
count = 0;
}
public void increment(){
count++;
}
public int tally{
return count;
public String toString(){
return name+"s count is""+count;}
}
}
}
}
public class Flips{
public static void main (String[] args){
int Integer.parseInt(args [0];)
Counter heads = new Counter ("Head");
Counter tails = new Counter("Tail");
for(int i = 1; i<=N; i++)
StdRandom.bernoulli(0,5);
heads.increment();
else
tails.increment();
}
public class Flips{
public static void main (String[] args){
int Integer.parseInt(args [0];)
Counter heads = new Counter ("Head");
Counter tails = new Counter("Tail");
for(int i = 1; i<=N; i++)
StdRandom.bernoulli(0,5);
heads.increment();
else
tails.increment();
StdOut.println(heads);
StdOut.println(tails);
}