Exemplo n.º 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();
        }
Exemplo n.º 2
0
 public void disply(drive d)
 {
     d.timing();
 }