Exemple #1
0
        static void Main(string[] args)
        {
            IUredaj uredaj1 = new Mikrovalna();
            IUredaj uredaj2 = new VesMasina();

            uredaj1.upali(new UredajDisplayVisitor());
            uredaj1.ugasi(new UredajDisplayVisitor());
            uredaj2.upali(new UredajDisplayVisitor());
            uredaj2.ugasi(new UredajDisplayVisitor());
        }
 public void upali(VesMasina vesMasina)
 {
     Console.WriteLine("Upaljena ves masina");
 }
 public void ugasi(VesMasina vesMasina)
 {
     Console.WriteLine("Ugasena ves masina");
 }