Update main.cpp

main
Matis MAZINGUE 3 years ago
parent 1fb8e40697
commit b78388b0bf

@ -140,123 +140,248 @@ 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.
*/ */
switch(choix3) { if(choix==1){
case 1: switch(choix3) {
/* case 1:
En fonction de la personne choisi avec la variable persChoix, il affiche ses contacts directs
*/ /*
if(persChoix==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{
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){
case 1:
/*
On affiche les contacts directs de tout le réseau
*/
c1.afficherContactDirect(); c1.afficherContactDirect();
if(persChoix==2)
c2.afficherContactDirect(); c2.afficherContactDirect();
if(persChoix==3)
c3.afficherContactDirect(); c3.afficherContactDirect();
if(persChoix==4)
c4.afficherContactDirect(); c4.afficherContactDirect();
if(persChoix==5)
c5.afficherContactDirect(); c5.afficherContactDirect();
if(persChoix==6)
c6.afficherContactDirect(); c6.afficherContactDirect();
if(persChoix==7)
c7.afficherContactDirect(); c7.afficherContactDirect();
if(persChoix==8)
c8.afficherContactDirect(); c8.afficherContactDirect();
if(persChoix==9)
c9.afficherContactDirect(); c9.afficherContactDirect();
if(persChoix==10)
c10.afficherContactDirect(); c10.afficherContactDirect();
if(persChoix==11)
c11.afficherContactDirect(); c11.afficherContactDirect();
if(persChoix==12)
c12.afficherContactDirect(); c12.afficherContactDirect();
if(persChoix==13)
c13.afficherContactDirect(); c13.afficherContactDirect();
if(persChoix==14)
c14.afficherContactDirect(); c14.afficherContactDirect();
if(persChoix==15)
c15.afficherContactDirect(); c15.afficherContactDirect();
break;
case 2: break;
/* case 2:
En fonction de la personne choisi avec la variable persChoix, il affiche sa propagation /*
*/ On affiche la propagation de tout le réseau
if(persChoix==1) */
c1.afficherContactIndirect(Contacts); c1.afficherContactIndirect(Contacts);
if(persChoix==2)
c2.afficherContactIndirect(Contacts); c2.afficherContactIndirect(Contacts);
if(persChoix==3)
c3.afficherContactIndirect(Contacts); c3.afficherContactIndirect(Contacts);
if(persChoix==4)
c4.afficherContactIndirect(Contacts); c4.afficherContactIndirect(Contacts);
if(persChoix==5)
c5.afficherContactIndirect(Contacts); c5.afficherContactIndirect(Contacts);
if(persChoix==6)
c6.afficherContactIndirect(Contacts); c6.afficherContactIndirect(Contacts);
if(persChoix==7)
c7.afficherContactIndirect(Contacts); c7.afficherContactIndirect(Contacts);
if(persChoix==8)
c8.afficherContactIndirect(Contacts); c8.afficherContactIndirect(Contacts);
if(persChoix==9)
c9.afficherContactIndirect(Contacts); c9.afficherContactIndirect(Contacts);
if(persChoix==10)
c10.afficherContactIndirect(Contacts); c10.afficherContactIndirect(Contacts);
if(persChoix==11)
c11.afficherContactIndirect(Contacts); c11.afficherContactIndirect(Contacts);
if(persChoix==12)
c12.afficherContactIndirect(Contacts); c12.afficherContactIndirect(Contacts);
if(persChoix==13)
c13.afficherContactIndirect(Contacts); c13.afficherContactIndirect(Contacts);
if(persChoix==14)
c14.afficherContactIndirect(Contacts); c14.afficherContactIndirect(Contacts);
if(persChoix==15)
c15.afficherContactIndirect(Contacts); c15.afficherContactIndirect(Contacts);
break;
break;
}
} }
} else{
else{ switch(choix3){ /* TEHCNIQUE N°2*/
switch(choix3){ case 1:
case 1: /*
/* On affiche les contacts directs de tout le réseau
On affiche les contacts directs de tout le réseau */
*/ c1.afficherContactDirect();
c1.afficherContactDirect(); c2.afficherContactDirect();
c2.afficherContactDirect(); c3.afficherContactDirect();
c3.afficherContactDirect(); c4.afficherContactDirect();
c4.afficherContactDirect(); c5.afficherContactDirect();
c5.afficherContactDirect(); c6.afficherContactDirect();
c6.afficherContactDirect(); c7.afficherContactDirect();
c7.afficherContactDirect(); c8.afficherContactDirect();
c8.afficherContactDirect(); c9.afficherContactDirect();
c9.afficherContactDirect(); c10.afficherContactDirect();
c10.afficherContactDirect(); c11.afficherContactDirect();
c11.afficherContactDirect(); c12.afficherContactDirect();
c12.afficherContactDirect(); c13.afficherContactDirect();
c13.afficherContactDirect(); c14.afficherContactDirect();
c14.afficherContactDirect(); c15.afficherContactDirect();
c15.afficherContactDirect();
break; break;
case 2: case 2:
/* /*
On affiche la propagation de tout le réseau On affiche la propagation de tout le réseau
*/ */
c1.afficherContactIndirect(Contacts); c1.afficherContactIndirect(Contacts);
c2.afficherContactIndirect(Contacts); c2.afficherContactIndirect(Contacts);
c3.afficherContactIndirect(Contacts); c3.afficherContactIndirect(Contacts);
c4.afficherContactIndirect(Contacts); c4.afficherContactIndirect(Contacts);
c5.afficherContactIndirect(Contacts); c5.afficherContactIndirect(Contacts);
c6.afficherContactIndirect(Contacts); c6.afficherContactIndirect(Contacts);
c7.afficherContactIndirect(Contacts); c7.afficherContactIndirect(Contacts);
c8.afficherContactIndirect(Contacts); c8.afficherContactIndirect(Contacts);
c9.afficherContactIndirect(Contacts); c9.afficherContactIndirect(Contacts);
c10.afficherContactIndirect(Contacts); c10.afficherContactIndirect(Contacts);
c11.afficherContactIndirect(Contacts); c11.afficherContactIndirect(Contacts);
c12.afficherContactIndirect(Contacts); c12.afficherContactIndirect(Contacts);
c13.afficherContactIndirect(Contacts); c13.afficherContactIndirect(Contacts);
c14.afficherContactIndirect(Contacts); c14.afficherContactIndirect(Contacts);
c15.afficherContactIndirect(Contacts); c15.afficherContactIndirect(Contacts);
break; break;
}
} }
} }
break; break;

Loading…
Cancel
Save