Esempio n. 1
0
        static void Main(string[] args)
        {
            Vehiculo v = new Vehiculo(20);

            v.Acelerar();
            v.Contacto();
            v.Acelerar();
            v.Acelerar();
            v.Acelerar();
            v.Frenar();
            v.Frenar();
            v.Frenar();
            v.Frenar();
        }
Esempio n. 2
0
        private static void Main(string[] args)
        {
            Vehiculo vehiculo = new Vehiculo();

            vehiculo.ConduccionDeportiva();
            vehiculo.Acelerar(2.4f);

            Console.WriteLine("");

            vehiculo.ConduccionNormal();
            vehiculo.Acelerar(2.4f);

            Console.ReadLine();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("\n Vehiculo \n");

            Vehiculo v = new Vehiculo();

            v.ConduccionDeportiva();
            v.Acelerar(2.4f);

            Console.WriteLine("");

            v.ConduccionNormal();
            v.Acelerar(2.4f);



            Console.WriteLine("\n Ordenamiento \n");

            SortedList studentRecords = new SortedList();

            studentRecords.Add("Samual");
            studentRecords.Add("Jimmy");
            studentRecords.Add("Sandra");
            studentRecords.Add("Vivek");
            studentRecords.Add("Anna");

            studentRecords.SetSortStrategy(new QuickSort());
            studentRecords.Sort();

            studentRecords.SetSortStrategy(new ShellSort());
            studentRecords.Sort();

            studentRecords.SetSortStrategy(new MergeSort());
            studentRecords.Sort();

            Console.ReadLine();
        }