4 Commits

Author SHA1 Message Date
Kouami Kpeglo c0a0e493bf Upload files to "img" 2026-10-14 12:50:55 +02:00
Kouami Kpeglo f48465fcff Upload files to "img" 2026-10-14 12:48:41 +02:00
Benicia Bounni Loubelo a90915a839 Actualiser COMPTE_RENDU.md 2026-10-14 12:45:50 +02:00
Benicia Bounni Loubelo b0e9a38dd3 Ajouter COMPTE_RENDU.md 2026-10-14 12:43:25 +02:00
7 changed files with 99 additions and 0 deletions
+99
View File
@@ -0,0 +1,99 @@
C2
![graphe C2](img/C2.png "graphe C2")
M = 8 - 7 + 2 = 3
M = 2 = 1 = 3
Complexité : simple (McCabe)
C4
![graphe C4](img/C4.png "graphe C4")
M = 22 - 16 + 2 = 8
M = 7 + 1 = 8
Complexité : simple (McCabe)
Justification - switch : chaque case du switch est représenté par un nœud de decision. Si la condition de ce nœud est vraie, on suit la branche sortante vers l'action du case correspondant. Si elle est fausse, on suit l'autre branche qui mène directement au noeud qui represente le case suivant a evaluer, et ainsi de suite.
Refactorisation :
`#include <stdio.h>
const char *const jours[] = {"lundi", "mardi", "mercredi", "jeudi","vendredi", "samedi", "dimanche", "inconnu"};
const char *nom_jour(int jour){
if(jour > 0 && jour <= 7)
return jours[jour - 1];
return jours[7];
}`
J2
![graphe J2](img/J2.png "graphe J2")
M = 10 - 8 + 2 = 4
M = 3 + 1 = 4
Complexité : simple (McCabe)
Justification - et : dans notre graphe, nous avons considere l'accumulation d'operateurs && comme etant 3 conditions imbriquees.
J6
![graphe J6](img/J6.png "graphe J6")
M = 24 - 18 + 2 = 8
M = 7 + 1 = 8
Complexité : simple (McCabe)
Justification - catch : par simplificite de modelisation de cet algortihme, dans notre graphe, nous avons represente le catch comme etant une simple condition;
ou : pour evaluer la condition a vraie, il faut deux sous conditions : une pour la premiere partie de l'expression (ligne.isBlank()) et une pour la deuxieme (ligne.startsWith("#")). Si la premiere sous-condition est evaluee a vraie, alors l'expression entiere est vraie; sinon on passe a la deuxieme sous-condtion, si elle est evaluee a vraie l'expression eneitere est vraie, sinon l'expression entiere est fausse.
et : dans notre graphe, nous avons considere l'accumulation d'operateurs && comme etant 2 conditions imbriquees.
P2
![graphe P2](img/P2.png "graphe P2")
M = 7 - 6 + 2 = 3
M = 2 + 1 = 3
Complexité : simple (McCabe)
P3
![graphe P3](img/P3.png "graphe P3")
M = 5 - 4 + 2 = 3
M = 2 + 1 = 3
Complexité : simple (McCabe)
Justification - pas de branche "sinon" : l'expression est un one liner python donc le sinon ne sert a rien car seule la conditon evaluee a vraie debouche sur une instruction
DESESQUELLES Antoine
KPEGLO Kouami
BOUNNI LOUBELO Benicia
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB