예제 #1
0
 public void Update(Nut subject)
 {
     Console.WriteLine($"The nut is now worth {_nut.Price}");
 }
예제 #2
0
 public NutStore(Nut nut)
 {
     _nut = nut;
     _nut.AddObserver(this);
 }