/// <summary> /// Accepts the specified b ike. /// </summary> /// <param name="bIke">The b ike.</param> public void Accept(BIke bIke) { switch (bIke.BikeType) { case "BULLET": Console.WriteLine("THE BIKE {0} WEIGHT {1} kg ", bIke.BikeName, 800); break; case "HONDA": Console.WriteLine("THE BIKE {0} WEight {1} kg ", bIke.BikeName, 350); break; } }
/// <summary> /// Accepts the specified b ike. /// </summary> /// <param name="bIke">The b ike.</param> public void Accept(BIke bIke) { switch (bIke.BikeType) { case "BULLET": Console.WriteLine("THE BIKE {0} mileage {1} kmph ", bIke.BikeName, 55); break; case "HONDA": Console.WriteLine("THE BIKE {0} mileage {1} kmph ", bIke.BikeName, 75); break; } }
public void Accept(BIke bIke) { decimal BikePriceAfterDis = bIke.Price - ((bIke.Price / 100) * Bike_dis); Console.WriteLine("BIKE {0} price {1}", bIke.Price, BikePriceAfterDis); }