Klasse Gebiet
This commit is contained in:
		@@ -9,5 +9,56 @@
 | 
			
		||||
 * @author Gubitz, Wöstemeyer, Pfannenstiel, Maier, Vigier :D
 | 
			
		||||
 */
 | 
			
		||||
public class Gebiet {
 | 
			
		||||
    //gepushter kommentar
 | 
			
		||||
    private int jahr;
 | 
			
		||||
    private int schlüssel;
 | 
			
		||||
    private String name;
 | 
			
		||||
    private long gesamtEinkommen;
 | 
			
		||||
    private int durchschnittsEinkommen;
 | 
			
		||||
 | 
			
		||||
    public Gebiet(int jahr, int schlüssel, String name, long gesamtEinkommen, int durchschnittsEinkommen) {
 | 
			
		||||
        this.jahr = jahr;
 | 
			
		||||
        this.schlüssel = schlüssel;
 | 
			
		||||
        this.name = name;
 | 
			
		||||
        this.gesamtEinkommen = gesamtEinkommen;
 | 
			
		||||
        this.durchschnittsEinkommen = durchschnittsEinkommen;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public int getJahr() {
 | 
			
		||||
        return jahr;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public int getAnzahlEinwohner(){
 | 
			
		||||
        if(getAnzahlEinwohner()== 0){
 | 
			
		||||
            return  -1;
 | 
			
		||||
        }
 | 
			
		||||
        return getAnzahlEinwohner();
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public int getSchlüssel() {
 | 
			
		||||
        return schlüssel;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getName() {
 | 
			
		||||
        return name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public long getGesamtEinkommen() {
 | 
			
		||||
        return gesamtEinkommen;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public int getDurchschnittsEinkommen() {
 | 
			
		||||
        return durchschnittsEinkommen;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "Gebiet{" +
 | 
			
		||||
                "jahr=" + jahr +
 | 
			
		||||
                ", schlüssel=" + schlüssel +
 | 
			
		||||
                ", name='" + name + '\'' +
 | 
			
		||||
                ", gesamtEinkommen=" + gesamtEinkommen +
 | 
			
		||||
                ", durchschnittsEinkommen=" + durchschnittsEinkommen +
 | 
			
		||||
                '}';
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user