Пример #1
0
        static void Main(string[] args)
        {
            Modele m      = new Modele("Lupo", 0.2);
            Option option = new Option("Direction Assistée", 250);

            m.AddOption(option);

            Vehicule v1 = new Voiture(m, "tam");
            Option   op = new Option("a", 0.2);

            v1.AddOption(op);
            Console.WriteLine(v1.possèdeOption(op.GetLibelle()));

            Vehicule v       = new Voiture(m, "1234");
            Option   optionV = new Option("AirBag", 320);

            v.AddOption(optionV);

            Console.WriteLine(v.ToString());
            Console.WriteLine(m.ToString());
            Console.ReadLine();
        }
Пример #2
0
 public Voiture(Modele modele, string immatriculation) : base(immatriculation)
 {
     this.modele = modele;
 }