示例#1
0
        static void Main(string[] args)
        {
            var plane = new Plane(100, 4);

            plane.TakeUpper(120);
            plane.TakeLower(100);
            plane.WriteAllProperties();

            var helicopter = new Helicopter(80, 3);

            helicopter.TakeUpper(120);
            helicopter.TakeLower(60);
            helicopter.WriteAllProperties();

            Console.ReadKey();
        }
示例#2
0
        static void Main(string[] args)
        {
            var first = new Plane(1200, 4);

            Console.WriteLine("Upper");
            first.TakeUpper(20);
            first.WriteProperties();
            Console.WriteLine("Lower");
            first.TakeLower(50);
            first.WriteProperties();

            var second = new Helicopter(2000, 4);

            Console.WriteLine("Upper");
            second.TakeUpper(40);
            second.WriteProperties();
            Console.WriteLine("Lower");
            second.TakeLower(20);
            second.WriteProperties();

            Console.ReadKey();
        }