Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Plane plane = new Plane(10, 10, 1000000, 1000, 2010, 750, 100);
            Ship  ship  = new Ship(15, 15, 1500000, 500, 2018, 20, "Одесса");
            Car   car   = new Car(20, 20, 15000, 220, 2017);

            car.Show(car);
            plane.Show(plane);
            ship.Show(ship);

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.Write("Введите цену самолета: ");
            double price_plane = Convert.ToDouble(Console.ReadLine());

            Console.Write("Введите скорость самолета: ");
            double speed_plane = Convert.ToDouble(Console.ReadLine());

            Console.Write("Введите год самолета: ");
            int year_plane = Convert.ToInt32(Console.ReadLine());

            Console.Write("Введите высту самолета: ");
            double height_plane = Convert.ToDouble(Console.ReadLine());

            Console.Write("Введитекол-во пассажиров самолета: ");
            int   count_peple_plane = Convert.ToInt32(Console.ReadLine());
            Plane plane             = new Plane(price_plane, speed_plane, year_plane, height_plane, count_peple_plane);

            plane.Show();
            Console.WriteLine(plane);

            Console.Write("Введите цену машины: ");
            double price_car = Convert.ToDouble(Console.ReadLine());

            Console.Write("Введите скорость машины: ");
            double speed_car = Convert.ToDouble(Console.ReadLine());

            Console.Write("Введите год машины: ");
            int year_car = Convert.ToInt32(Console.ReadLine());
            Car car      = new Car(price_car, speed_car, year_car);

            car.Show();

            Console.Write("Введите цену коробля: ");
            double price_ship = Convert.ToDouble(Console.ReadLine());

            Console.Write("Введите скорость коробля: ");
            double speed_ship = Convert.ToDouble(Console.ReadLine());

            Console.Write("Введите год коробля: ");
            int year_ship = Convert.ToInt32(Console.ReadLine());

            Console.Write("Введите порт коробля: ");
            string port_ship = Console.ReadLine();

            Console.Write("Введитекол-во пассажиров коробля: ");
            int  count_peple_ship = Convert.ToInt32(Console.ReadLine());
            Ship ship             = new Ship(price_ship, speed_ship, year_ship, port_ship, count_peple_ship);

            ship.Show();
            Console.WriteLine(ship);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("|Car|");
            Car car = new Car(123, 231, 5000, 10, 2007);

            car.Show();
            Console.WriteLine("\n|Ship|");
            Ship ship = new Ship(4234, 123, 400000, 3.3, 2009, "Odessa", 100);

            ship.Show();
            Console.WriteLine("\n|Plane|");
            Plane plane = new Plane(123, 53, 10000, 100, 2019, 1, 4);

            plane.Show();
        }
Ejemplo n.º 4
0
Archivo: Task3.cs Proyecto: o1egsey/lr4
        static void Main(string[] args)
        {
            Ship A = new Ship();

            A.Input();
            Console.WriteLine("********************");
            A.Show();
            Console.WriteLine("********************");

            Carrier B = new Carrier();

            B.Input1();
            Console.WriteLine("********************");
            B.Show1();
            Console.WriteLine("********************");

            Rocket_launcher C = new Rocket_launcher();

            C.Input2();
            Console.WriteLine("********************");
            C.Show2();
            Console.WriteLine("********************");
            Console.ReadKey();
        }