main.c 1.42 KB
Newer Older
Anthony Bocquet's avatar
Anthony Bocquet committed
1 2 3
#include <stdio.h>
#include <stdlib.h>
#include "tp3.h"
Anthony Bocquet's avatar
Anthony Bocquet committed
4 5


Anthony Bocquet's avatar
Anthony Bocquet committed
6 7 8
int main(){
    char matiere[30] = "histoire";
    T_Note* noteA = creerNote(12,matiere);
Anthony Bocquet's avatar
Anthony Bocquet committed
9 10


Anthony Bocquet's avatar
Anthony Bocquet committed
11
    T_ListeEtu liste = creerListe();
Anthony Bocquet's avatar
Anthony Bocquet committed
12

Anthony Bocquet's avatar
Anthony Bocquet committed
13 14 15
    T_Etudiant* etu1 = creerEtudiant(1,"Bocquet", "Anthony");
    T_Etudiant* etu2 = creerEtudiant(2,"Doe", "John");
    T_Etudiant* etu3 = creerEtudiant(4,"Test", "Test");
Anthony Bocquet's avatar
Anthony Bocquet committed
16

Anthony Bocquet's avatar
Anthony Bocquet committed
17 18 19
    ajouterEtuListe(etu2,liste);
    ajouterEtuListe(etu1, liste);
    ajouterEtuListe(etu3, liste);
Anthony Bocquet's avatar
Anthony Bocquet committed
20

Anthony Bocquet's avatar
Anthony Bocquet committed
21
/*
Anthony Bocquet's avatar
Anthony Bocquet committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    ajouterNoteEtu(1, "SR01", 1, liste);
    ajouterNoteEtu(2, "NF16", 1, liste);
    ajouterNoteEtu(3, "LO21", 1, liste);

    ajouterNoteEtu(5, "SR01", 2, liste);
    ajouterNoteEtu(6, "NF16", 2, liste);
    ajouterNoteEtu(7, "LO21", 2, liste);



    ajouterNoteEtu(12, "SR01", 3, liste);
    ajouterNoteEtu(14, "NF16", 3, liste);
    ajouterNoteEtu(20, "LO21", 3, liste);


    ajouterNoteEtu(20, "SR01", 4, liste);
    ajouterNoteEtu(14, "NF16", 4, liste);
    ajouterNoteEtu(20, "LO21", 4, liste);

Anthony Bocquet's avatar
Anthony Bocquet committed
41
*/
Anthony Bocquet's avatar
Anthony Bocquet committed
42 43 44 45 46 47 48
 /*
    liste = supprimerNoteEtu("NF16", 1, liste);
    liste = supprimerNoteEtu("SR01", 1, liste);
    liste = supprimerNoteEtu("LO21", 1, liste);
*/


Anthony Bocquet's avatar
Anthony Bocquet committed
49
    //liste = trierListeEtu(liste);
Anthony Bocquet's avatar
Anthony Bocquet committed
50 51 52

    afficherListe(liste);

Anthony Bocquet's avatar
Anthony Bocquet committed
53
    //sousListes(liste, "SR01");
Anthony Bocquet's avatar
Anthony Bocquet committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
  /*
    for(int i = 0; i < liste->nbrNotes; i++){
      printf("%d\n", liste->liste->note);
      liste->liste = liste->liste->suivant;
    }*/


    //calculMoyenne(liste);


    //afficherClassement(liste);






    return 0;
Anthony Bocquet's avatar
Anthony Bocquet committed
72
}