Skip to content
Snippets Groups Projects
Commit 0594bd4d authored by TRITSCHBERGER ANTOINE's avatar TRITSCHBERGER ANTOINE
Browse files

Ajout de la appreciation

parent 1b51ec1e
Branches
1 merge request!9Ajout de la appreciation
......@@ -14,77 +14,90 @@ namespace psychorientation
{
}
public void ajouterEleve(Eleve e)
public void AjouterEleve(Eleve e)
{
this.listEleve.Add(e);
}
public void supprimerEleve(Eleve e)
public void SupprimerEleve(Eleve e)
{
this.listEleve.Remove(e);
}
public void supprimerEleve(int indice)
public void SupprimerEleve(int indice)
{
this.listEleve.RemoveAt(indice);
}
public List<Eleve> getListEleve()
public List<Eleve> GetListEleve()
{
return this.listEleve;
}
public Eleve getEleve(int indice)
public Eleve GetEleve(int indice)
{
return this.listEleve[indice];
}
public double getMoyenneClasse()
public double GetMoyenneClasse()
{
double res = -1;
if (this.listEleve.Count > 0)
{
foreach (Eleve el in this.listEleve)
{
res += el.getMoyenne();
res += el.GetMoyenne();
}
}
return res / this.listEleve.Count;
}
public double getCompetenceClasse()
public double GetCompetenceClasse()
{
double res = -1;
if (this.listEleve.Count > 0)
{
foreach (Eleve el in this.listEleve)
{
res += el.getCompetence();
res += el.GetCompetence();
}
}
return res / this.listEleve.Count;
}
public double getEffortClasse()
public double GetEffortClasse()
{
double res = -1;
if (this.listEleve.Count > 0)
{
foreach (Eleve el in this.listEleve)
{
res += el.getEffort();
res += el.GetEffort();
}
}
return res / this.listEleve.Count;
}
public void faireControle(string nom)
public void FaireControle(string nom)
{
foreach(Eleve e in this.listEleve)
foreach (Eleve e in this.listEleve)
{
e.ajouterNote(nom);
e.AjouterNote(nom);
}
}
public double GetAppreciationClasse()
{
double res = -1;
if (this.listEleve.Count > 0)
{
foreach (Eleve el in this.listEleve)
{
res += el.GetAppreciation();
}
}
return res / this.listEleve.Count;
}
}
}
......@@ -14,7 +14,7 @@ namespace psychorientation
private int orientation = 0;
private int id;
private List<Note> listNote = new List<Note>();
private double appreciation;
public Eleve(int id)
{
......@@ -32,58 +32,63 @@ namespace psychorientation
this.competence = competence;
this.effort = effort;
this.orientation = orientation;
this.appreciation = CalculerAppreciation();
}
public void setClasse(int classe)
public void SetClasse(int classe)
{
this.classe = classe;
}
public void setOrientation(int orientation)
public void SetOrientation(int orientation)
{
this.orientation = orientation;
}
public void setEffort(double effort)
public void SetEffort(double effort)
{
this.effort = effort;
}
public void setCompetence(double competence)
public void SetCompetence(double competence)
{
this.competence = competence;
}
public double getCompetence()
public double GetCompetence()
{
return this.competence;
}
public List<Note> getListNote()
public List<Note> GetListNote()
{
return this.listNote;
}
public int getId()
public int GetId()
{
return this.id;
}
public int getClasse()
public int GetClasse()
{
return this.classe;
}
public int getOrientation()
public int GetOrientation()
{
return this.orientation;
}
public double getEffort()
public double GetEffort()
{
return this.effort;
}
public double GetAppreciation()
{
return this.appreciation;
}
public double getMoyenne()
public double GetMoyenne()
{
double res = -1;
if (this.listNote.Count > 0)
......@@ -97,15 +102,20 @@ namespace psychorientation
}
public void ajouterNote(string nom)
public void AjouterNote(string nom)
{
Note n = new Note(nom,calculerNote() , this.competence, this.effort);
Note n = new Note(nom,CalculerNote() , this.competence, this.effort);
this.listNote.Add(n);
}
private double calculerNote()
private double CalculerNote()
{
return (this.effort * Config.GetInstance().GetCoeffEffortEcrit() + this.competence * Config.GetInstance().GetCoeffCompetenceEcrit());
}
private double CalculerAppreciation()
{
return this.effort*0.2+this.competence*1.8;
return (this.effort * Config.GetInstance().GetCoeffEffortOral() + this.competence * Config.GetInstance().GetCoeffCompetenceOral());
}
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment