package lab15_observer.ex1; public class MedicalEmployee implements PatientObserver { private final String name; public MedicalEmployee(String name, PatientMonitoring pm) { this.name = name; pm.registerObserver(this); } public String getName() { return name; } @Override public void update(Problem problem, PatientMonitoring pm) { System.out.println(getName() + " has been notified of " + problem + " for patient " + pm); } }