All pastes #927961 Raw Edit

Zeug

public text v1 · immutable
·published 2008-03-04 18:01 UTC
rendered paste body

public class Prüfung {
	
	boolean bestanden;
	int anzahlVersuche;
	double note;
 
	Prüfung()
	{
		this.bestanden = false;
		this.anzahlVersuche = 0;
		this.note = 0.0;
	}
	
	public	boolean darfNochmalSchreiben()
	 {
		 if(3 == this.anzahlVersuche)
			 return false;
		 else 
			 return true;
	 } //ende Methdoe

	public void erhöheVersuchsAnzahl()
	{
		this.anzahlVersuche ++;
	}
 
	public int anzahlVersuche()
	{
		return this.anzahlVersuche;
	}
	
	public boolean bestanden()
	{
		return this.bestanden;
	}
	
	public double note()
	{
		return this.note;
	}
	
	public void ändereNote(int neueNote)
	{
		this.note = neueNote;
	}
	
	public void ändereBestanden(boolean hatBestanden)
	{
		this.bestanden = hatBestanden;
	}

} //ende Klasse