class Student extends Person
{
	private String matrikel;
	private String studienOrt;
	private static int count;
	
	
	Student(String name, String vorname, String matrikel, String studienOrt)
	{
		super(name,vorname);
		this.matrikel=matrikel;
		this.studienOrt=studienOrt;
		count++;
	}
	
	public void setMatrikel(String matrikel)
	{
		this.matrikel=matrikel;
	}
	public void setStudienOrt(String studienOrt)
	{
		this.studienOrt=studienOrt;
	}
	public String getMatrikel()
	{
		return matrikel;
	}
	public String getStudienOrt()
	{
		return studienOrt;
	}
	public static int getCount()
	{
		return count;
	}
	
//	public boolean equals(Object obj)
//	{
//		 Student a=null;
//		 if (obj instanceof Student)
//		 	a=(Student)obj;
//		 else
//		 	return false;
//		 if (this.getName().equals(a.getName())&&
//		 		this.getVorname().equals(a.getVorname())&&this.matrikel.equals(a.matrikel)&&this.studienOrt.equals(a.studienOrt))	
//		 	return true;
//		 else
//		 	return false;	
//	}	
	public boolean equals(Object obj)
	{
		if(obj instanceof Student)
			return (this.getName().equals(((Student)obj).getName())&&this.getVorname().equals(((Student)obj).getVorname()));
		return super.equals(obj);	
	}		 
	public String toString()
	{
		return ("Name: "+this.getName()+", Vorname: "+this.getVorname()+", MatrikelNr: "+this.matrikel+", Uni: "+this.studienOrt);
	}		 	 				
}	