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

Merge branch 'master' into 'master'

Ajout d'un gestionnaire d'eleve ainsi qu'une liste de note et d'une classe note

See merge request !6
parents 6069f112 ec168ca8
1 merge request!6Ajout d'un gestionnaire d'eleve ainsi qu'une liste de note et d'une classe note
......@@ -13,7 +13,7 @@ namespace psychorientation
public partial class Form1 : Form
{
List<string> listClasse = new List<string>();
List<Eleve> listEleve = new List<Eleve>();
GestionnaireEleve gestEleve = new GestionnaireEleve();
int nombreEleve = 5;
......@@ -35,7 +35,7 @@ namespace psychorientation
for(int i = 0; i < nbEleve; i++)
{
Eleve elev = new Eleve(i);
listEleve.Add(elev);
gestEleve.ajouterEleve(elev);
}
}
......@@ -51,7 +51,7 @@ namespace psychorientation
InterfaceInfoEleve ii = new InterfaceInfoEleve();
ii.setParam(listEleve[0],listClasse);
ii.setParam(gestEleve.getEleve(0),listClasse);
ii.Left = 0;
ii.Top = 0;
ii.BorderStyle = BorderStyle.Fixed3D;
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace psychorientation
{
public class GestionnaireEleve
{
private List<Eleve> listEleve = new List<Eleve>();
public GestionnaireEleve()
{
}
public void ajouterEleve(Eleve e)
{
this.listEleve.Add(e);
}
public void supprimerEleve(Eleve e)
{
this.listEleve.Remove(e);
}
public void supprimerEleve(int indice)
{
this.listEleve.RemoveAt(indice);
}
public List<Eleve> getListEleve()
{
return this.listEleve;
}
public Eleve getEleve(int indice)
{
return this.listEleve[indice];
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace psychorientation
{
public class Note
{
private string nom;
private double note;
private double competence;
private double effort;
public Note(string nom, double note, double competence, double effort)
{
this.nom = nom;
this.note = note;
this.competence = competence;
this.effort = effort;
}
public string getNom()
{
return this.nom;
}
public double getNote()
{
return this.note;
}
public double getCompetence()
{
return this.competence;
}
public double getEffort()
{
return this.effort;
}
}
}
......@@ -13,6 +13,7 @@ namespace psychorientation
private double effort = 0;
private int orientation = 0;
private int id;
private List<Note> listNote = new List<Note>();
public Eleve(int id)
......@@ -53,10 +54,16 @@ namespace psychorientation
this.competence = competence;
}
public double getCompetence()
{
return this.competence;
}
public List<Note> getListNote()
{
return this.listNote;
}
public int getId()
{
return this.id;
......@@ -73,5 +80,15 @@ namespace psychorientation
{
return this.effort;
}
public void ajouterNote(string nom, double note)
{
Note n = new Note(nom, note, this.competence, this.effort);
this.listNote.Add(n);
}
}
}
......@@ -57,6 +57,7 @@
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="GestionnaireEleve.cs" />
<Compile Include="InterfaceInfoEleve.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -69,6 +70,7 @@
<Compile Include="Message.Designer.cs">
<DependentUpon>Message.cs</DependentUpon>
</Compile>
<Compile Include="Note.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
......
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