#include <string>
#include <iostream>
#include "Professor.h"
#include "UniNeProfessor.h"
#include "EPFLProfessor.h"
#include "Student.h"
#include "UniNeStudent.h"
#include "EPFLStudent.h"
#include "EPFLFactory.h"
#include "UniNeFactory.h"
#include "Factory.h"


void programme(Factory* f){
/*    Professor* prof1 = new UniNeProfessor("Muster");
    Professor* prof2 = new UniNeProfessor("Important");
    Professor* prof3 = new UniNeProfessor("Top");
    
    Student* stud1 = new UniNeStudent("Dujenou");
    Student* stud2 = new UniNeStudent("Durand");
    Student* stud3 = new UniNeStudent("Dumoulin");
*/

/*
    Professor* prof1 = new EPFLProfessor("Muster");
    Professor* prof2 = new EPFLProfessor("Important");
    Professor* prof3 = new EPFLProfessor("Top");
    
    Student* stud1 = new EPFLStudent("Dujenou");
    Student* stud2 = new EPFLStudent("Durand");
    Student* stud3 = new EPFLStudent("Dumoulin");
*/


    Professor* prof1 = f->createProfessor("Muster");
    Professor* prof2 = f->createProfessor("Important");
    Professor* prof3 = f->createProfessor("Top");
    
    Student* stud1 = f->createStudent("Dujenou");
    Student* stud2 = f->createStudent("Durand");
    Student* stud3 = f->createStudent("Dumoulin");


    stud1->registerByProfForMasterThesis(prof1);
    stud1->registerByProfForMasterThesis(prof2);

    stud2->registerByProfForMasterThesis(prof1);

    stud3->registerByProfForMasterThesis(prof1);

    prof1->saysToStudents("Bienvenue dans mon cours");
    prof1->saysToStudents("(long silence)");

    prof2->saysToStudents("Nous allons parler de C++");
    prof2->saysToStudents("Commencons par le pattern Factory");

    prof3->saysToStudents("Bande de cancres");
    prof3->saysToStudents("Vous n'avez rien compris");

    stud1->display();
    stud2->display();
    stud3->display();

}

int main(int argc, std::string argv[]){

    Factory* f = UniNeFactory::getInstance(); 
    std::cout << "We test the program on the Uni of Neuchatel" <<std::endl;
    ::programme(f);
    std::cout << std::endl;
    Factory* f2 = EPFLFactory::getInstance(); 
    std::cout << "We test the program on the EPFL" <<std::endl;
    ::programme(f2);
    std::cout << std::endl;
}
