SAE S1.02 - Comparaison d'approches algorithmiques
structures.h
1 #include <string.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4 
5 /* Partie 1 */
10 typedef struct maillonDept
11 {
12  char departement[30]; /*< Nom du département*/
13  int nbP;
14  char resp[30];
15  struct maillonDept *suiv;
17 
18 typedef struct
19 {
20  char ville[30];
21  ListeDept ldept;
22 } VilleIUT;
23 
24 /* Partie 2 */
25 typedef struct
26 {
27  char ville[30];
28  char departement[30];
29  int decisionAdmission;
30  int decisionCandidat;
31 } Choix;
32 
33 typedef struct maillonChoix
34 {
35  Choix choix;
36  struct maillonChoix *suiv;
38 
39 typedef struct
40 {
41  int num;
42  char nom[22]; // 20 caractere + 1 espace + 1 caractere de fin de chaine
43  char prenom[22]; // 20 caractere + 1 espace + 1 caractere de fin de chaine
44  float tabNotes[5];
45  int nbChoix;
46  ListeChoix lChoix;
47 } Etudiant;
48 
49 enum
50 {
51  maths,
52  francais,
53  anglais,
54  spe,
55  moy
56 };
57 
58 /* ListeDept */
59 ListeDept listenouv(void);
60 ListeDept insererEnTete(ListeDept ld, char departement[], int nbP, char resp[]);
61 ListeDept inserer(ListeDept ld, char departement[], int nbP, char resp[]);
62 void afficher(ListeDept ld);
63 bool vide(ListeDept ld);
64 void afficherDept(ListeDept ld);
65 int rechercheDept(ListeDept ld, char departement[], bool *trouve);
66 ListeDept supprimerEnTete(ListeDept ld);
67 ListeDept supprimer(ListeDept ld, char departement[]);
68 int longueur(ListeDept ld);
69 int getNbP(ListeDept ld, int pos);
70 void setNbP(ListeDept ld, int pos, int valeur);
71 char *getResp(ListeDept ld, int pos);
72 void setResp(ListeDept ld, int pos, char valeur[]);
73 char *getDept(ListeDept ld, int pos);
74 void setResp(ListeDept ld, int pos, char valeur[]);
75 
76 /* ListeChoix */
77 ListeChoix listenouvChoix(void);
78 ListeChoix insererEnTeteChoix(ListeChoix lc, Choix choix);
79 ListeChoix insererChoix(ListeChoix lc, Choix choix);
80 ListeChoix supprimerEnTeteChoix(ListeChoix lc);
81 ListeChoix supprimerChoix(ListeChoix lc, Choix choix);
82 bool rechercheChoix(ListeChoix lc, Choix choix);
83 Choix TeteChoix(ListeChoix lc);
84 bool videChoix(ListeChoix lc);
85 void afficherChoix(ListeChoix lc);
86 int longueurChoix(ListeChoix lc);
87 void afficherCandidatsChoix(Choix choix);
88 char *getDeptChoix(ListeChoix lc, int pos);
89 char *getVilleChoix(ListeChoix lc, int pos);
90 int trouverPos(ListeChoix lc, char ville[], char dept[]);
91 void setDecisionAdmission(ListeChoix lc, int pos, int val);
Definition: structures.h:26
Definition: structures.h:40
Definition: structures.h:19
Definition: structures.h:34
Liste des départements.
Definition: structures.h:11