static void Main(string[] args) { Engine en = new Engine(1); AC ac = new AC(2); LandVehicle lv = new LandVehicle(en, ac, 2); trip tr = new trip("Morning", 3); drive dr = new drive("Evening"); lv.display(); lv.disply(dr); dr.timing(); tr.timing(); en.display(); ac.display(); Console.ReadLine(); }
public void disply(drive d) { d.timing(); }