#include "UniNeStudent.h"
#include "Professor.h"
#include "Sujet.h"
#include <iostream>
using namespace std;

UniNeStudent::UniNeStudent(string name){
    this->name = name;
}
void UniNeStudent::registerByProfForMasterThesis(UniNeProfessor* p){
    listOfProfs.push_back(p);
    
    p->enregistrerObservateur(this);
}
void UniNeStudent::registerByProfForMasterThesis(Professor* p){
    registerByProfForMasterThesis((UniNeProfessor*) p);
}

 
void UniNeStudent::actualiser(string message, Professor* p){
    listOfMessages.push_back(p->getName()+": \"" + message+"\"");
}
void UniNeStudent::display(){
    cout << "Etudiant: "<< name << endl;
    cout << "Message de mes profs:"<< endl;

    list<string>::iterator the_iterator;
    the_iterator = listOfMessages.begin();
    while( the_iterator != listOfMessages.end() ) {
	cout << (*the_iterator) << endl;
	the_iterator++;
    }
}


