Пример #1
0
        static void Main(string[] args)
        {
            Engine      e1   = new Engine(2);
            AC          ac1  = new AC(1);
            LandVehicle Veh1 = new LandVehicle(e1, ac1, 321);
            trip        tr   = new trip("Morning", 3);
            drive       dr   = new drive("Evening");

            Veh1.display();
            Veh1.disply(dr);
            dr.timing();
            tr.timing();
            e1.display();
            ac1.display();
            Console.WriteLine("\n ---other vehicle--\n");
            Engine       e2   = new Engine(1);
            AC           ac2  = new AC(2);
            othervehicle Veh2 = new othervehicle(e1, ac1, "honda 123");
            trip         tr2  = new trip("Morning", 3);
            drive        dr2  = new drive("Evening");

            Veh2.display();
            Veh2.disply(dr2);
            dr2.timing();
            tr2.timing();
            e2.display();
            ac2.display();
            Console.ReadLine();
        }
Пример #2
0
 public othervehicle(Engine eng3, AC ac3, string name) : base(eng3, ac3)
 {
     this.name = name;
 }
Пример #3
0
 public LandVehicle(Engine eng2, AC ac2, int mod1) : base(eng2, ac2)
 {
     this.model = mod1;
 }
Пример #4
0
 public Vehicle(Engine e, AC Ac)
 {
     this.EngN = e;
     this.AcN  = Ac;
 }