package GUIAnwendungen.StudentManagementSystem;

public class Student {
	
	private String name;
	private String vorname;
	private char geschlecht;
	private String email;
	private String tele;
	private String adresse;
	private String geburtstag;
	private int id;
	
	private Student(StudenBuilder student) {
		this.name = student.name;
		this.vorname = student.vorname;
		this.geschlecht = student.geschlecht;
		this.email = student.email;
		this.tele = student.tele;
		this.adresse = student.adresse;
		this.geburtstag = student.geburtstag;
		this.id = student.id;
	}
	
	public static class StudenBuilder {
		private String name;
		private String vorname;
		private char geschlecht;
		private String email;
		private String tele;
		private String adresse;
		private String geburtstag;
		private int id;
		
		
		public StudenBuilder setName(String name) {
			this.name = name;
			return this;
		}
		
		public StudenBuilder setVorname(String vorname) {
			this.vorname = vorname;
			return this;
		}
		
		public StudenBuilder setGeschlecht(char geschlecht) {
			this.geschlecht = geschlecht;
			return this;
		}
		
		public StudenBuilder setEmail(String email) {
			this.email = email;
			return this;
		}
		
		public StudenBuilder setTele(String tele) {
			this.tele = tele;
			return this;
		}
		
		public StudenBuilder setAdresse(String adresse) {
			this.adresse = adresse;
			return this;
		}
		
		public StudenBuilder setGeburtstag(String geburtstag) {
			this.geburtstag = geburtstag;
			return this;
		}
		
		public StudenBuilder setId(int id) {
			this.id = id;
			return this;
		}
		
		public Student build() {
			return new Student(this);
		}
	}

	@Override
	public String toString() {
		return "Student [name=" + name + ", vorname=" + vorname + ", geschlecht=" + geschlecht + ", email=" + email
				+ ", tele=" + tele + ", adresse=" + adresse + ", geburtstag=" + geburtstag + ", id=" + id + "]";
	}

}
