/** * This class represents a coin. Only a single Coin * object is created. This class implements the * singleton design pattern. * * @author Franck van Breugel */ public class Coin { /** * The unique instance. */ private static Coin instance = new Coin(); /** * Initializes the coin. */ private Coin() {} /** * Returns the coin. * * @return the coin. */ public static Coin getInstance() { return Coin.instance; } }