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(); }
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(); }
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(); }