package tp2;

import java.util.ArrayList;
public class Promotion {
	private ArrayList<Etudiant> listeetudiants;
	private int annee;
	public Promotion () {
		
	}
	public Promotion (int ext_annee) {
		listeetudiants= new ArrayList<Etudiant> ();
		annee = ext_annee;
	}
	public int getNbEtu() {
		return listeetudiants.size();
	}
	public Etudiant getEtu(int n) {
		return listeetudiants.get(n);
	}
	public void Inscrire (String name, /*Date birthyear,*/ int codeIns, int codePays, double note1, double note2, double note3) {
		listeetudiants.add(new Etudiant(name,codeIns,codePays,note1, note2, note3));
	}
	public double moyenneGenerale () {
		double totnotes =0;
		for (int i =0; i < this.getNbEtu();i ++ ) {
			totnotes += listeetudiants.get(i).getMoy()
		}
		return totnotes/this.getNbEtu();
	}
	
}
