static void Main(string[] args) { Rueda otra; Tiempo tiempo; Kilometro kilo; Carrera carrera; otra = new Rueda("Gomas", 3); //tiempo = new Tiempo(10); //kilo = new Kilometro(10); tiempo = 10; kilo = 10; /*tiempo = tiempo + 10; * tiempo.MostrarTiempo(); * tiempo = tiempo + tiempo; * tiempo.MostrarTiempo(); * kilo = kilo + 10; * kilo.MostrarKilometro(); * kilo = kilo + kilo; * kilo.MostrarKilometro(); * tiempo = tiempo - 10; * tiempo.MostrarTiempo(); * * * if (tiempo == 10) * { * Console.WriteLine("son iguales"); * } * else * { * Console.WriteLine("El conocimiento es poder"); * * }*/ carrera = new Carrera(); carrera.CorrerCarrera(kilo); carrera.MostrarCarrera(); Console.ReadKey(); }
public Auto() { switch (numerorandom) { case 1: this.fabricante = (eFabricante)1; break; case 2: this.fabricante = (eFabricante)2; break; case 3: this.fabricante = (eFabricante)3; break; } this.DI = new Rueda(); this.DD = new Rueda(); this.TD = new Rueda(); this.TI = new Rueda(); this.tiempoDemorado = 0; Auto.ContadorDeObjetos++; }