Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Enter the number of wheels of the car you want to create");

            var numberOfWheels = Console.ReadLine();
            var vehicle        = VehicleFactory.GetVehicle(numberOfWheels);

            vehicle.Drive();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            int  numOfWheels;
            bool input = false;

            do
            {
                Console.WriteLine("Enter the amonut of the tites for the vechicle you want to create:");

                input = int.TryParse(Console.ReadLine(), out numOfWheels);
            } while (input == false);

            var vehicle = VehicleFactory.GetVechicle(numOfWheels);

            vehicle.Drive();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            int  numOfWheels;
            bool input = false;

            do
            {
                Console.WriteLine("Enter the amount of tires of the vehicle you want to create:");
                //int wheelCount;

                input = int.TryParse(Console.ReadLine(), out numOfWheels);
            } while (!input);

            var vehicle = VehicleFactory.GetVehicle(numOfWheels);

            vehicle.Drive();
        }