Professional Documents
Culture Documents
White Box
White Box
uses Crt;
var
Nil:Integer; Lagi:Char;
begin
Lagi:=’Y’
while(update(Lagi) = 'Y') do
begin
clrscr;
begin
writeln('Lulus');
end;
else
begin
writeln('Gagal');
end;
end;
end;
clrscr;
end.
Flowchart
Flowgraph
Independent paths
Path 1 : A-B-C-D-E-F-H-I-B-J
Path 2 : A-B-C-D-E-G-H-I-B-J
Cyclomatic Complexity
V(G) = E - N + 2
V(G) = (11 – 10) + 2
=2+1
=3
Hasil Pengujian
Path Kasus Uji Hasil yang diharapkan Hasil yang didapatkan
1 Memberi input >=75 Hasil = ’Lulus’ Hasil = ’Lulus’
2 Memberi input <=75 Hasil = ’Gagal’ Hasil = ’Gagal’