parent
bff22d3979
commit
20c4097524
@ -1,130 +0,0 @@
|
||||
#include "partie1.h"
|
||||
|
||||
void choixMenu(void)
|
||||
{
|
||||
int choix;
|
||||
bool c = false;
|
||||
while (c == false)
|
||||
{
|
||||
system("clear");
|
||||
printf("Veuillez choisir votre menu :\n");
|
||||
printf("\t1 - Menu utilisateur\n");
|
||||
printf("\t2 - Menu administrateur\n");
|
||||
printf("\t9 - Quitter\n");
|
||||
printf("\nEntrez votre choix :\n> ");
|
||||
scanf("%d", &choix);
|
||||
switch (choix)
|
||||
{
|
||||
case 1:
|
||||
c = true;
|
||||
menuUtilisateur();
|
||||
break;
|
||||
case 2:
|
||||
c = true;
|
||||
menuAdministrateur();
|
||||
break;
|
||||
case 9:
|
||||
c = true;
|
||||
break;
|
||||
default:
|
||||
printf("Option non reconnue. Veuillez recommencer.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void menuUtilisateur(void)
|
||||
{
|
||||
int choix;
|
||||
bool c = false;
|
||||
while (c == false)
|
||||
{
|
||||
system("clear");
|
||||
printf("Menu d'utilisateur : Que voulez-vous faire ?\n");
|
||||
printf("\t1 - Voir les villes possédant un IUT\n");
|
||||
printf("\t2 - Voir les départements dans chaque IUT\n");
|
||||
printf("\t3 - Voir le nombre de places en première année\n");
|
||||
printf("\t4 - Voir les IUT possédant un département particulier\n");
|
||||
printf("\t9 - Quitter\n");
|
||||
printf("\nEntrez votre choix :\n> ");
|
||||
scanf("%d", &choix);
|
||||
switch (choix)
|
||||
{
|
||||
case 1:
|
||||
c = true;
|
||||
// affichageVillesIUT(VilleIUT *tiut[], int nb);
|
||||
break;
|
||||
case 2:
|
||||
c = true;
|
||||
// affichageDeptIUT(VilleIUT *tiut[], int nb);
|
||||
break;
|
||||
case 3:
|
||||
c = true;
|
||||
//
|
||||
break;
|
||||
case 4:
|
||||
c = true;
|
||||
//
|
||||
break;
|
||||
case 9:
|
||||
c = true;
|
||||
return choixMenu();
|
||||
default:
|
||||
printf("Option non reconnue. Veuillez recommencer.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void menuAdministrateur(void)
|
||||
{
|
||||
int choix;
|
||||
bool c = false;
|
||||
while (c == false)
|
||||
{
|
||||
system("clear");
|
||||
printf("Menu d'administrateur : Que voulez-vous faire ?\n");
|
||||
printf("\t1 - Modifier le nombre de places dans un département\n");
|
||||
printf("\t2 - Créer un département dans un IUT\n");
|
||||
printf("\t3 - Supprimer un département d'un IUT\n");
|
||||
printf("\t4 - Modifier le responsable d'un département\n");
|
||||
printf("\t5 - Lancer la phase de candidature\n");
|
||||
printf("\t6 - Stopper la phase de candidature\n");
|
||||
printf("\t9 - Quitter\n");
|
||||
printf("\nEntrez votre choix :\n> ");
|
||||
scanf("%d", &choix);
|
||||
switch (choix)
|
||||
{
|
||||
case 1:
|
||||
c = true;
|
||||
// modificationNbPDept(tiut, nb);
|
||||
break;
|
||||
case 2:
|
||||
c = true;
|
||||
// creationDept(tiut[], nb);
|
||||
break;
|
||||
case 3:
|
||||
c = true;
|
||||
// suppressionDept(tiut[], nb);
|
||||
break;
|
||||
case 4:
|
||||
c = true;
|
||||
// modificationRespDept(tiut, nb);
|
||||
break;
|
||||
case 5:
|
||||
c = true;
|
||||
//
|
||||
break;
|
||||
case 6:
|
||||
c = true;
|
||||
//
|
||||
break;
|
||||
case 9:
|
||||
return choixMenu();
|
||||
break;
|
||||
default:
|
||||
printf("Option non reconnue. Veuillez recommencer.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
void choixMenu(void);
|
||||
void menuUtilisateur(void);
|
||||
void menuAdministrateur(void);
|
@ -1,20 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include "structures.h"
|
||||
#include "menus.h"
|
||||
|
||||
/* Fichier */
|
||||
int chargementVillesIUT(VilleIUT *tiut[]);
|
||||
int rechercheVille(VilleIUT *tiut[], int nb, char val[], bool *trouve);
|
||||
void sauvegarde(VilleIUT *tiut[], int nb);
|
||||
|
||||
/* Utilisateur */
|
||||
void affichageVillesIUT(VilleIUT *tiut[], int nb);
|
||||
void affichageDeptIUT(VilleIUT *tiut[], int nb);
|
||||
|
||||
/* Administrateur */
|
||||
void modificationNbPDept(VilleIUT *tiut[], int nb);
|
||||
void creationDept(VilleIUT *tiut[], int nb);
|
||||
int suppressionDept(VilleIUT *tiut[], int nb);
|
||||
void modificationRespDept(VilleIUT *tiut[], int nb);
|
@ -1,34 +0,0 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct maillonDept
|
||||
{
|
||||
char departement[30];
|
||||
int nbP;
|
||||
char resp[30];
|
||||
struct maillonDept *suiv;
|
||||
} MaillonDept, *ListeDept;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char ville[30];
|
||||
ListeDept ldept;
|
||||
} VilleIUT;
|
||||
|
||||
ListeDept listenouv(void);
|
||||
ListeDept insererEnTete(ListeDept l, char departement[], int nbP, char resp[]);
|
||||
ListeDept inserer(ListeDept l, char departement[], int nbP, char resp[]);
|
||||
void afficher(ListeDept l);
|
||||
bool vide(ListeDept l);
|
||||
void afficherDept(ListeDept l);
|
||||
int rechercheDept(ListeDept l, char departement[], bool *trouve);
|
||||
ListeDept supprimerEnTete(ListeDept l);
|
||||
ListeDept supprimer(ListeDept l, char departement[]);
|
||||
|
||||
int getNbP(ListeDept l, int pos);
|
||||
void setNbP(ListeDept l, int pos, int valeur);
|
||||
char* getResp(ListeDept l, int pos);
|
||||
void setResp(ListeDept l, int pos, char valeur[]);
|
||||
char* getDept(ListeDept l, int pos);
|
||||
void setResp(ListeDept l, int pos, char valeur[]);
|
@ -1,4 +1,4 @@
|
||||
#include "partie1.h"
|
||||
#include "SAE.h"
|
||||
|
||||
void modificationNbPDept(VilleIUT *tiut[], int nb)
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
#include "partie1.h"
|
||||
#include "SAE.h"
|
||||
|
||||
/*
|
||||
ListeDept chargeListeDept(VilleIUT *tiut[])
|
@ -0,0 +1,52 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Partie 1 */
|
||||
typedef struct maillonDept
|
||||
{
|
||||
char departement[30];
|
||||
int nbP;
|
||||
char resp[30];
|
||||
struct maillonDept *suiv;
|
||||
} MaillonDept, *ListeDept;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char ville[30];
|
||||
ListeDept ldept;
|
||||
} VilleIUT;
|
||||
|
||||
/* Partie 3 */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char departement[30];
|
||||
int decisionAdmission;
|
||||
int decisionCandidat;
|
||||
} Departement;
|
||||
|
||||
typedef struct maillonDepartement
|
||||
{
|
||||
Departement v;
|
||||
struct maillonDepartement *suiv;
|
||||
} MaillonDepartement, *ListeDepartement;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int num;
|
||||
char nom[22]; // 20 caractere + 1 espace + 1 caractere de fin de chaine
|
||||
char prenom[22]; // 20 caractere + 1 espace + 1 caractere de fin de chaine
|
||||
int tabMatiere[4];
|
||||
int nbChoix;
|
||||
char ville[30];
|
||||
ListeDepartement ldept;
|
||||
} Admission;
|
||||
|
||||
typedef struct maillonAdmission
|
||||
{
|
||||
Admission v;
|
||||
struct maillonAdmission *suiv;
|
||||
} MaillonAdmission, *ListeAdmission;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "partie1.h"
|
||||
#include "SAE.h"
|
||||
|
||||
ListeDept listenouv(void)
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
#include "partie1.h"
|
||||
#include "SAE.h"
|
||||
|
||||
int main(void)
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
#include "partie1.h"
|
||||
#include "SAE.h"
|
||||
|
||||
void affichageVillesIUT(VilleIUT *tiut[], int nb)
|
||||
{
|
Loading…
Reference in new issue