Write a Java program that simulates the flipping of a coin 1000 times and prints the total number of heads and tails. You must create a class called Coin with the following public methods:
void flip(): flips the coin (Hint: Math.random() generates a random floating-point number between 0 and 1.)
boolean isHeads(): returns true if the coin shows heads
String toString(): returns the current face of the coin as a string