package GUIAnwendungen.Meine_GUI_Chat;

public class Modell {
	
	private String name;
	private int kontostand;
	private int id;
	private String password;
	private static int ID = 100;
	
	public Modell() {}
	public Modell(String name, String password) {
		this.name = name;
		this.kontostand = 0;
		this.password = password;
		this.id = ++ID;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
	
	public int getKontostand() {
		return kontostand;
	}
	public void setKontostand(int kontostand) {
		this.kontostand = kontostand;
	}
	//set ID ist nicht erlaubt
	public int getId() {
		return id;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public String toString() {
		return "[name=" + name + ", Kontostand=" + kontostand + ", id=" + id + ", password=" + password + "]";
	}
}


