Пример #1
0
        static void Main(string[] args)
        {
            //Parent pobj = new Parent();
            // Child cobj = new Child();
            // Grandchild gobj = new Grandchild();
            // pobj.Getvalues(12, "ch");
            //  pobj.Display();
            // cobj.Getvalues(23, "asp.net");
            //cobj.Display();
            //cobj.Calculate(30);
            //gobj.Getvalues(30, "asp.netcore");
            // gobj.Display();
            // gobj.Calculate(20);
            //gobj.Multiply(30);
            // Vehicle v = new Vehicle();
            Car c = new Car("blue", 150, "premium");
            Bus b = new Bus();

            //v.start();
            //  v.stop();
            c.start();
            c.drive();
            c.stop();
            c.fillfuel();
            b.start();
            b.stop();
            b.run();
            b.fillfuel();
            Console.ReadKey();
        }
Пример #2
0
        static void Main(string[] args)
        {
            //Vehicle veh = new Vehicle();
            Car alto  = new Car("black", 120, "premium");
            Bus volvo = new Bus();

            // veh.start();
            //veh.stop();
            alto.start();
            alto.Drive();
            alto.fillfuel();
            alto.stop();
            volvo.start();
            volvo.fillfuel();
            volvo.Run();
            volvo.stop();
            //Parent pObj = new Parent();
            //Child obj = new Child();
            //GrandChild gObj = new GrandChild();
            //pObj.getValues(12, " cts");
            //pObj.display();
            //obj.getValues(23, " C#");
            //obj.display();
            //obj.Calculate(12);
            //gObj.getValues(10, "  ASP.Net");
            //gObj.display();
            //gObj.Calculate(20);
            //gObj.multiply(10);
            Console.ReadLine();
        }