Page 703 - IT2
P. 703

{
               return this.nserie +" "+this.pht +" "+ this.qte_stk +" "+ this.qte_min ;
               }


               public void Sapprovisionner (int qte)
               {

               this.qte_stk=this.qte_stk+qte;

               }
               public void Achat(int qte)
               {

                   this.qte_stk = this.qte_stk - qte;
                   if (this.qte_stk < this.qte_min)
                       Console.WriteLine("Attention! il faut s'approvisionner");

               }
                 }




                      Classe « Habit »


               class Habit : Article
                   {
                       private int taille;
                       private string couleur;

                       public Habit (string nserie, float pht, int qte_stk, int
               qte_min,int taille,string couleur)
                       :base( nserie,  pht,  qte_stk,  qte_min)
                       {
                           this.taille = taille;
                           this.couleur = couleur;

                               }


                       public new string ToString()
                       {
                           return base.ToString() + " " + this.taille + " " +
               this.couleur;
                       }
                   }


                      Classe « Electroménager »

               class Electromenager : Article
                   {
                       private float poids;
                       private int duree;

                       public Electromenager(string nserie, float pht, int qte_stk, int
                       qte_min, float poids, int duree)
                           : base(nserie, pht, qte_stk, qte_min)
                       {
                           this.poids = poids;

                     Filière                    Epreuve                        Session              8/10
                       DI                 Synthèse V2(Correction)            Juillet 2015
   698   699   700   701   702   703   704   705   706   707   708