java – The CoinFlip class that prints coin features

I'm trying to create a class that tosses a coin and returns the year and the type of coin. I'm sure I did my class right, but can anyone show me what the test class should look like?

This is my class:

public class coin
{
// These are constants provided for your use. For example with the
Constant "TAILS" corresponds to the entry of a 1.
private final static int HEADS = 0;
private final static int TAILS = 1;
private final static int UNKNOWN = -1;

// ADD: private instance variables, type (string), year (int), face (int)
private string type;
private int year
private int face;

// ADD: set type and year to parameter, set face equal to UNKNOWN
public coin (string _type, int _year)
{
type = _type;
year = _year;
Face = UNKNOWN;
}

// ADD: set type, year and face to parameter
public coin (string _type, int _year, int _face)
{
type = _type;
year = _year;
face = _face;
}

// ADD: returns the value of the variable type
public String getType ()
{
Return type;
}

// ADD: If the year is between 1850 and 2015 (inclusive), set the year and confirm with true.
Otherwise, just return false
public boolean setYear (int _year)
{
year = _year;
if ((year> = 1850) && (year <= 2015))
{
return true;
}
otherwise
{
return it incorrectly;
}
}

// ADD: returns the value of the coin. (.25 for a quarter, .10 for a dime, etc.)
// Precondition: Type has a valid value of "quarter", "cent", "nickel" or "penny"
public double getValue ()
{
double value;
if (type == "quarter")
{
Value = 0.25;
}

if (Type == "Dime")
{
Value = .10;
}

if (Type == "Nickel")
{
Value = 0.05;
}

if (Type == "Penny")
{
Value = 0.01;
}
Return value;
}

// ADD: return the year
public int getYear ()
{
Return year;
}

// ADD: returns the string "Heads", "Tails" or "Unknown"
public String getFace ()
{
Return face;
}

// ADD: Use Math.random to create a random int (0 for head, 1 for tail).
// set face to the value and then use the getFace method to return "heads" or "tails"
// To call the getFace method, the code is simply: getFace ()
public string flip ()
{
if (Math.random () <0.5)
{
getFace ("heads");
}
otherwise
{
getFace ("Tails");
}
Return flip;
}


// ADD: Returns the year and coin type. For example: 1985 quarter
public String toString ()
{

}

}

This is my test class:

/ * Prompts the user for the number of coin throws.
Turn the number by the specified number of times - the number of coins is displayed
Flip and the result
Shows the number of coin heads and the number of tails!

How many flips do you want? 4
1. Heads
2. tails
3rd heads
4th heads

The results:
3 heads - 75.0%
1 cocks - 25,0%
* /
Import java.util.Scanner;
public class coin flipper
{
public static void main (String[] args)
{
Coin = new coin ("Viertel", 1950,0);
Scanner in = new scanner (System.in);
int flips;
System.out.println ("How many flips?");
flips = in.nextInt ();

System.out.println ("The Results:");
}
}