/// <summary> /// Accepts the specified bike. /// </summary> /// <param name="bike">The bike.</param> public void Accept(RaceBike bike) { switch (bike.BikeType) { case "Bullet": Console.WriteLine("Bike {0} weight: {1} KG", bike.BikeName, 300); break; case "Normal": Console.WriteLine("Bike {0} weight: {1} KG", bike.BikeName, 100); break; } }
/// <summary> /// Accepts the specified bike. /// </summary> /// <param name="bike">The bike.</param> public void Accept(RaceBike bike) { decimal bikePriceAfterDicount = bike.Price - ((bike.Price / 100) * BIKEDISCOUNT); Console.WriteLine("Bike {0} price: {1}", bike.BikeName, bikePriceAfterDicount); }