testing konfirm pd Klinik
<?PHP
1 $nama=$_POST['nama'];
2 if($nama!="" ){
3 $qry=mysql_query("select * from coco where kd_co='$nama'");
4 }else{
5 $qry=mysql_query("select * from coco");
}
6 while ($row = mysql_fetch_array ($qry)) {
7 $sta=$row["sta"];
8 if ($sta==1){
9 $sta="Sukses";
10 } else {$sta="Waiting";}
}
?>
cyclomatic complexity untuk diagram alir
V(G) = 5 region
V(G) = 13 edge - 10 node + 2 = 5
V(G) = 4 predicate node + 1 = 5
independent path pada flowgraph
Dari hasil perhitungan cyclomatic complexity terdapat 5 independent path
1. 1-2-3-4-6-7-8-9
2. 1-2-3-5-6-7-8-9
3. 1-2-3-5-6-7-8-10
4.1-2-3-4-5-6-7-10-7-10
5.1-2-3-4-5-6-7-8-9
<?PHP
1 $nama=$_POST['nama'];
2 if($nama!="" ){
3 $qry=mysql_query("select * from coco where kd_co='$nama'");
4 }else{
5 $qry=mysql_query("select * from coco");
}
6 while ($row = mysql_fetch_array ($qry)) {
7 $sta=$row["sta"];
8 if ($sta==1){
9 $sta="Sukses";
10 } else {$sta="Waiting";}
}
?>
cyclomatic complexity untuk diagram alir
V(G) = 5 region
V(G) = 13 edge - 10 node + 2 = 5
V(G) = 4 predicate node + 1 = 5
independent path pada flowgraph
Dari hasil perhitungan cyclomatic complexity terdapat 5 independent path
1. 1-2-3-4-6-7-8-9
2. 1-2-3-5-6-7-8-9
3. 1-2-3-5-6-7-8-10
4.1-2-3-4-5-6-7-10-7-10
5.1-2-3-4-5-6-7-8-9
0 komentar:
Posting Komentar