Play audio slide show -- Keyboard shortcut: 'x'  Back to slide -- Keyboard shortcut: 'u'  next        Play sound for this slide -- Keyboard shortcut: 'y'  Bank3.java - Subklassen CheckKonto.Lecture 7 - slide 31 : 41
Program 2

class CheckKonto extends Konto {

   protected double ågerRenteSats = 0.18;
   protected int checkNummer; 

   public CheckKonto(String nytNavn) {
     super(nytNavn);
     ågerRenteSats = 0.18;
     checkNummer = 0;
   }

   public void hævCheck(double beløb){
     this.hæv(beløb);
     checkNummer = checkNummer + 1;
   }
               
   public void tilskrivRente() {
     if (saldo > 0)  
        super.tilskrivRente();
     else
        saldo = saldo + saldo * ågerRenteSats;
   }

   public String toString() {
     return super.toString() +
            "Udskrevene checks: " + checkNummer + "\n";
   }

} // End Checkkonto