public class Student extends Person
{
	private int martrikelnummer;
	private String studienort;
	private static int anzahl;
	
	Student (String name, String vorname,
			int martrikelnummer, String studienort)
	{
		super(name, vorname);
		this.martrikelnummer=martrikelnummer;
		this.studienort=studienort;
		anzahl++;
	}
	
	public String toString()
	{
		return getClass().getName()+
				", Name: "+
				this.getName()+
				" Vorname: " +
				this.getVorname()+
				", Martrikelnummer: "+
				this.martrikelnummer+
				", Studienort: " +
				this.studienort;
	}
	
	public boolean equals(Object o)
	{
		if(o instanceof Student)
		{
			Student sP = (Student) o;
			return (super.equals(o)&&
						sP.martrikelnummer == this.martrikelnummer &&
						sP.studienort.equals(this.studienort));
		}
		return super.equals(o);
		
	}
	
	void setMartrikelnummer(int martrikelnummer)
	{
		this.martrikelnummer=martrikelnummer;
	}
	
	void setStudienort(String studienort)
	{
		this.studienort=studienort;
	}
	
	int getMartrikelnummer()
	{
		return this.martrikelnummer;
	}
	
	String getStudienort()
	{
		return this.studienort;
	}
	
	static int getAnzahlStudenten()
	{
		return anzahl;
	}
}