public ComputerProxy(Computer computer) { _computer = computer; _realComputer = new RealComputer(); }
public NewComputerProxy(Computer computer) { _computer = computer; }
public void Visit(Computer computer) { Total += computer.Price; }
private static void Visitors() { var comp1 = new Computer("Lenovo", "Intel i5", 2, 250, 2009, 750); var priceVisitor=new TotalPrice(); comp1.Accept(priceVisitor); Console.ForegroundColor = ConsoleColor.DarkYellow; Console.WriteLine("The Price is "+ priceVisitor.Total); }
public void Notify(Computer computer) { var ukInfo= CultureInfo.GetCultureInfo("en-GB"); Console.WriteLine("Send Email: Computer Lenovo is available in stores."); Console.WriteLine("Its cost "+300.ToString("C", ukInfo)); }