
public class Francobollo
{
	// instance variables - replace the example below with your own
	private String val,an,ser;
	private float prez;
	private int disp;

	/**
	 * Constructor for objects of class Francobollo
	 */
	public Francobollo(String valore, String serie, float prezzo)
	{
		// initialise instance variables
		val = valore;
		ser = serie;
		prez = prezzo;
		disp = 0;
	}

	/**
	 * An example of a method - replace this comment with your own
	 * 
	 * @param  y   a sample parameter for a method
	 * @return     the sum of x and y 
	 */
	public String getValore()
	{
		// put your code here
		return val;
	}
	public String getSerie()
	{
		// put your code here
		return ser;
	}
	public float getPrezzo()
	{
		// put your code here
		return prez;
	}
	public int getDisp()
	{
		// put your code here
		return disp;
	}
	public void setDisp(boolean acquisto, int n)
	{
		// put your code here
		if (acquisto) disp+=n;
		else disp-=n;
	}
	public boolean isDisp(int n)
	{
		// put your code here
		if (disp >= n) return true;
		else return false;
	}
    public boolean uguale( Francobollo x ) 
	{
		// put your code here
		return x.val.equals(val) &&
		       x.ser.equals(ser) &&
		       x.prez == prez;
	}
}
