Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //sous-classe c est une classe qui herite de l autre
- Class Manager:Employe{
- // list des employee
- List<Employe> LE = new List<Employe>();
- public Manager(){}
- public Manager(int numMatr,string nom,string prenom,DateTime DateEmb,decimal solde,List<Employe> LE)
- :base(numMatr,nom,prenom,DateEmb,solde)
- {
- this.LE=LE;
- }
- public override string ToString(){
- string info="";
- for(byte i=0;i<LE.Count;i++)
- info+=("\t"+LE[i].ToString()+"\n");
- return base.ToString()+info;
- }
- public void ListeEmployes(){
- for(byte i=0;i<LE.Count;i++)
- Console.WriteLine(LE[i].ToString());
- }
- public void AjouterEmploye(Employe E){
- LE.Add(E);
- }
- public Employe GetEmployeByCode(int numMat){
- for(byte i=0;i<LE.Count;i++)
- if(LE[i].NumMat==numMat)
- return LE[i];
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment