// WARNING: This file is auto-generated and any changes to it will be overwritten import lang.stride.*; import java.util.*; import greenfoot.*; /** * Die Uebungen (mit Loesungen) zu diesem Szenario finden Sie hier: * http://www.informatikzentrale.de/uebungen-foreach-schleife-greenfoot-3.html */ public class Konto extends Actor { private int kontonummer; private double kontostand; private String inhaberName; /** * */ public Konto(int kontonummer, double kontostand, String inhaberName) { this.kontonummer = kontonummer; this.kontostand = kontostand; this.inhaberName = inhaberName; } /** * Act - do whatever the Konto wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { } /** * */ public String kontodatenHolen() { String kontodaten = ""; kontodaten = kontodaten + "Konto Nr. " + this.kontonummer + ", "; kontodaten = kontodaten + "Inhaber: " + this.inhaberName + ", "; kontodaten = kontodaten + "Kontostand" + this.kontostand + "."; return kontodaten; } /** * */ public double getKontostand() { return this.kontostand; } /** * */ public int getKontonummer() { return this.kontonummer; } /** * */ public String getInhaberName() { return this.inhaberName; } }