Page 704 - IT2
P. 704

this.duree = duree;

                       }

                       public DateTime datefinGarantie()
                       {

                           DateTime res = DateTime.Now.AddMonths(duree);

                               return (res);
                       }

                       public Boolean Sousgarantie(DateTime date_achat)
                       {
                           DateTime d = DateTime.Now;
                           if (date_achat.AddMonths(duree) > d)
                               return true;
                           else return false;

                       }

                       public new string ToString()
                       {
                           return base.ToString() + " " + this.poids + " " + this.duree;
                       }
                  }










               class Program
                   {
                       static void Main(string[] args)
                       {

               Television t1 = new Television("tv123", 80,13.50F, 3500, "lcd", 100);
                           Console.WriteLine(t1.ToString());
                           Console.WriteLine(t1.ClasseEneergétique());
                           VeloElec v1 = new VeloElec("v122", 250, 25, 11500, 50.50F,
               560);

                           v1.Rouler(20.50F);
                           v1.Charger(120);
                           Console.WriteLine(v1.ToString());
                           Console.ReadLine();
                       }
               }

                     Dossier 3: Programmation événementielle

                      1.  le code permettant de remplir la liste


                                       comboBox1.Items.Add("Studio");


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