public PinAutomaat() { correctePinIngevoerd = new CorrectePinStatus(this); geenGeldAanwezig = new GeenGeldStatus(this); kaartAanwezig = new KaartAanwezigStatus(this); kaartNietAanwezig = new GeenKaartStatus(this); this.bedragInAutomaat = BedragInAutomaat; // Zet het bedrag in het automaat ZetBedragInAutomaat(); // Zet status standaard op kaart-niet-aanwezig automaatStatus = kaartNietAanwezig; }
public PinAutomaat(int bedragInAutomaat) { kaartAanwezig = new KaartAanwezigStatus(this); kaartNietAanwezig = new GeenKaartStatus(this); geenGeldAanwezig = new GeenGeldStatus(this); correctePinCodeIngevoerd = new CorectePinStatus(this); this.bedragInAutomaat = bedragInAutomaat; if (bedragInAutomaat > 0) { automaatStatus = geenGeldAanwezig; } else { automaatStatus = kaartNietAanwezig; } }
public void ZetAutomaatStatus(IPinAutomaatStatus nieuweStatus) { automaatStatus = nieuweStatus; }
internal void setAutomaatStatus(IPinAutomaatStatus status) { automaatStatus = status; }