Update main.cpp

main
Matis MAZINGUE 3 years ago
parent 1fb8e40697
commit b78388b0bf

@ -140,8 +140,10 @@ int main(){
/* /*
On applique en fonction de notre choix3 les méthodes voulu, afin d'éviter des répétitions dans les case. On applique en fonction de notre choix3 les méthodes voulu, afin d'éviter des répétitions dans les case.
*/ */
if(choix==1){
switch(choix3) { switch(choix3) {
case 1: case 1:
/* /*
En fonction de la personne choisi avec la variable persChoix, il affiche ses contacts directs En fonction de la personne choisi avec la variable persChoix, il affiche ses contacts directs
*/ */
@ -214,6 +216,82 @@ int main(){
} }
} }
else{ else{
switch(choix3) { /* TEHCNIQUE N°2*/
case 1:
/*
En fonction de la personne choisi avec la variable persChoix, il affiche ses contacts directs
*/
if(persChoix==1)
c1.afficherContactDirect();
if(persChoix==2)
c2.afficherContactDirect();
if(persChoix==3)
c3.afficherContactDirect();
if(persChoix==4)
c4.afficherContactDirect();
if(persChoix==5)
c5.afficherContactDirect();
if(persChoix==6)
c6.afficherContactDirect();
if(persChoix==7)
c7.afficherContactDirect();
if(persChoix==8)
c8.afficherContactDirect();
if(persChoix==9)
c9.afficherContactDirect();
if(persChoix==10)
c10.afficherContactDirect();
if(persChoix==11)
c11.afficherContactDirect();
if(persChoix==12)
c12.afficherContactDirect();
if(persChoix==13)
c13.afficherContactDirect();
if(persChoix==14)
c14.afficherContactDirect();
if(persChoix==15)
c15.afficherContactDirect();
break;
case 2:
/*
En fonction de la personne choisi avec la variable persChoix, il affiche sa propagation
*/
if(persChoix==1)
c1.afficherContactIndirect(Contacts);
if(persChoix==2)
c2.afficherContactIndirect(Contacts);
if(persChoix==3)
c3.afficherContactIndirect(Contacts);
if(persChoix==4)
c4.afficherContactIndirect(Contacts);
if(persChoix==5)
c5.afficherContactIndirect(Contacts);
if(persChoix==6)
c6.afficherContactIndirect(Contacts);
if(persChoix==7)
c7.afficherContactIndirect(Contacts);
if(persChoix==8)
c8.afficherContactIndirect(Contacts);
if(persChoix==9)
c9.afficherContactIndirect(Contacts);
if(persChoix==10)
c10.afficherContactIndirect(Contacts);
if(persChoix==11)
c11.afficherContactIndirect(Contacts);
if(persChoix==12)
c12.afficherContactIndirect(Contacts);
if(persChoix==13)
c13.afficherContactIndirect(Contacts);
if(persChoix==14)
c14.afficherContactIndirect(Contacts);
if(persChoix==15)
c15.afficherContactIndirect(Contacts);
break;
}
}
}
else{
if(choix==1){
switch(choix3){ switch(choix3){
case 1: case 1:
/* /*
@ -259,6 +337,53 @@ int main(){
break; break;
} }
} }
else{
switch(choix3){ /* TEHCNIQUE N°2*/
case 1:
/*
On affiche les contacts directs de tout le réseau
*/
c1.afficherContactDirect();
c2.afficherContactDirect();
c3.afficherContactDirect();
c4.afficherContactDirect();
c5.afficherContactDirect();
c6.afficherContactDirect();
c7.afficherContactDirect();
c8.afficherContactDirect();
c9.afficherContactDirect();
c10.afficherContactDirect();
c11.afficherContactDirect();
c12.afficherContactDirect();
c13.afficherContactDirect();
c14.afficherContactDirect();
c15.afficherContactDirect();
break;
case 2:
/*
On affiche la propagation de tout le réseau
*/
c1.afficherContactIndirect(Contacts);
c2.afficherContactIndirect(Contacts);
c3.afficherContactIndirect(Contacts);
c4.afficherContactIndirect(Contacts);
c5.afficherContactIndirect(Contacts);
c6.afficherContactIndirect(Contacts);
c7.afficherContactIndirect(Contacts);
c8.afficherContactIndirect(Contacts);
c9.afficherContactIndirect(Contacts);
c10.afficherContactIndirect(Contacts);
c11.afficherContactIndirect(Contacts);
c12.afficherContactIndirect(Contacts);
c13.afficherContactIndirect(Contacts);
c14.afficherContactIndirect(Contacts);
c15.afficherContactIndirect(Contacts);
break;
}
}
}
break; break;
case 3: case 3:

Loading…
Cancel
Save