76
1
using System;
2
using System.Collections.Generic;
3
4
public interface IObserver
5
{
6
void Notify();
7
}
8
9
public class SpreadSheet : IObserver
10
{
11
public void Notify()
12
{
13
Console.WriteLine("Spreadsheet got notified");
14
}
15
}
16
17
public class Chart: IObserver
18
{
19
public void Notify()
20
{
21
Console.WriteLine("Chart got notified");
22
}
23
}
24
Cached Result