diff --git a/SAE.c b/SAE.c index 1ccbecb..3f9a180 100644 --- a/SAE.c +++ b/SAE.c @@ -73,9 +73,9 @@ int choixMenu(void) int choix; printf("\t Gestion des matières\n"); printf("1.\tAffichage\n"); - printf("2.\tAjouter un client\n"); - printf("3.\tModifier l'âge d'un client\n"); - printf("4.\tSuppression d'un client\n"); + printf("2.\tAjouter un adhérent\n"); + printf("3.\tModifier l'âge d'un adhérent\n"); + printf("4.\tSuppression d'un adhérent\n"); printf("5.\tAjout de points sur une carte\n"); printf("6.\tModification de l'état de la carte\n"); printf("7.\tCréditer une activité à une carte\n"); @@ -85,18 +85,16 @@ int choixMenu(void) return choix; } -int MenuAffichage(void) +int choixMenuAffichage(void) { int choix; printf("\t Gestion des matières\n"); - printf("1.\taffichage\n"); - printf("2.\tAjouter un client\n"); - printf("3.\tModifier l'âge d'un client\n"); - printf("4.\tsuppression d'un client\n"); - printf("5.\tAjout de points sur une carte\n"); - printf("6.\tModification de l'état de la carte\n"); - printf("7.\tCréditer une activité à une carte\n"); - printf("8.\tquitter\n"); + printf("1.\tAffichage des informations d'un adhérent\n"); + printf("2.\tAffichage des informations de tous les adhérents\n"); + printf("3.\tAffichage du nombre d’entrées totale dans la journée\n"); + printf("4.\tAffichage du nombre d'entrées totale de toutes les journées\n"); + printf("5.\tAffichage du nombre total d'adhérents\n"); + printf("6.\tquitter\n"); printf("\noption choisie :\n"); scanf("%d", &choix); return choix; @@ -108,7 +106,7 @@ void gestionMatieres(void) int tDate[20] = {0}, tNbActivitesJour[20] = {0}; int tmax = 20, nbelem, choix, pasAct; nbelem = Ouverture(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, tmax, &pasAct); - if(nbMatieres < 0) + if(nbelem < 0) { printf("Erreur d'ouverture du fichier ou tableau plein !!!\n"); return ; @@ -118,7 +116,35 @@ void gestionMatieres(void) { if(choix == 1) { - MenuAffichage(tMatieres, tCoeff, nbMatieres); + choix = choixMenuAffichage(); + while(choix != 9) + { + if(choix == 1) + { + + } + if(choix == 2) + { + modificationCoefficient(tMatieres, tCoeff, nbMatieres); + } + if(choix == 3) + { + nbMatieres = insertionNewMatiere(tMatieres, tCoeff, nbMatieres, max); + } + if(choix == 4) + { + nbMatieres = suppressionMatiere(tMatieres, tCoeff, nbMatieres); + } + if(choix == 5) + { + MoyenneNotesMatiere(tMatieres, tNotes, tNbNotes, nbMatieres); + } + if(choix == 6) + { + MoyenneEtudiant(tCoeff, tMatieres, tNotes, tNbNotes, nbMatieres); + } + choix = choixMenu(); + } } if(choix == 2) { @@ -143,7 +169,6 @@ void gestionMatieres(void) choix = choixMenu(); } sauvegarde(tMatieres, tCoeff, nbMatieres); - fclose(flot); exit(1); } /*