double IBakeryComponent.GetPrice() { return(m_Price + m_BaseComponent.GetPrice()); }
private static void PrintProductDetails(IBakeryComponent cBase) { Console.WriteLine(string.Format("Item: {0}, Price: {1}", cBase.GetName(), cBase.GetPrice())); }
public double GetPrice() { return(m_Price + m_BaseComponent.GetPrice()); }
private static void PrintProductDetails(IBakeryComponent component) { Console.WriteLine(); // some whitespace for readability Console.WriteLine("Item: {0}, Price: {1}", component.GetName(), component.GetPrice()); }