Stop show with sound -- Keyboard shortcut: 'x'  Next slide in show -- Keyboard shortcut: 'n'  1 minute, 36 secondsIntroduktion til objekt-orienteret programmering - slide 4 : 31

Eksempel: Struktureret programmering (3) 

procedure checkkontoTransaktion;
var ck: checkKonto;

    forskellige transaktions procedurer på checkKonto

    function LaesTransaktionsType: TransaktionsType;
    begin ... end;

    procedure hentCheckKonto(var k: CheckKonto);
    begin ... end;

    procedure GemCheckKonto(var k: CheckKonto);
    begin ... end;

begin
  hentCheckKonto(ck);
  tt := LaesTransaktionsType;
  case tt of
    opret:  opretCheckKonto(ck);
    hæve:  hæveCheckKonto(ck);
    indsætte: indsætteCheckKonto(ck);
    tilskrivRente: tilskrivRenteCheckKonto(ck);
    clearCheck: clearEnCheck(ck);
    nedlaeg:  nedlaegCheckKonto(ck);
  end;
  gemCheckKonto(ck);
end (* checkkontoTransaktion *)
 

minibank2.pasMinibank programmet i sammenhæng.