Ejemplo n.º 1
0
        public void PerformSaling(IVisitorSchool saleman)
        {
            foreach (IElementSchool kid in _kids)
            {
                saleman.Visit(kid);
            }

            foreach (IElementSchool teacher in _teachers)
            {
                saleman.Visit(teacher);
            }
        }
Ejemplo n.º 2
0
        public void PerformExamination(IVisitorSchool doctor)
        {
            foreach (IElementSchool kid in _kids)
            {
                doctor.Visit(kid);
            }

            foreach (IElementSchool teacher in _teachers)
            {
                doctor.Visit(teacher);
            }
        }
Ejemplo n.º 3
0
 public void Accept(IVisitorSchool visitor)
 {
     visitor.Visit(this);
 }