public abstract class Printmedium {

    /*
     * Da wir für jede Variable getter und setter generiert haben, setzen
     * wir die Variablen auf protected, damit sie in den Unterklassen noch sehen
     * können, sie nach außen dennoch private sind.
     */
	protected String titel = "ohne titel";
	
	protected int jahr = 0;
	
	protected String zustand = "Neuwertig";
	
	protected String ort = "Regal";
	
	public void ausleihen(String ausl)
	{
		ort = ausl;
	}
	
	public void zurueckbekommen()
	{
		ort= "Regal";
		if(zustand.equals("Neuwertig"))
			zustand = "Gebraucht";
		else if(zustand.equals("Gebraucht"))
			zustand = "Altpapier";
	}
	
	public String getZustand()
	{
		return zustand;
	}
	
	public String getTitel()
	{
		return titel;
	}
	
	public String getOrt()
	{
		return ort;
	}
	
	public int getErscheinungsjahr()
	{
		return jahr;
	}
	
	void setZustand(String zustand)
	{
		this.zustand = zustand;
	}
	
	void setTitel(String titel)
	{
		this.titel = titel;
	}
	
	void setOrt(String ort)
	{
		this.ort = ort;
	}
	
	void setErscheinungsjahr(int jahr)
	{
		this.jahr = jahr;
	}
}
