toString
This commit is contained in:
@@ -48,4 +48,9 @@ public class Gebiet implements GebietInterface{
|
||||
public int getAnzahlEinwohner() {
|
||||
return (int)(gesamtEinkommen / durchschnittsEinkommen);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName() + "\n" + getAnzahlEinwohner() + " Einwohner\n" + getDurchschnittsEinkommen() + " Euro / Einwohner\n";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user