@@ -0,0 +1,1086 @@
+package modelo;%0A%0Aimport java.util.ArrayList;%0A%0Aimport controlador.IObserver;%0A%0Apublic class TipoDeCambio implements ISubject %7B%0A%09private double cambioEuroDolar;%0A%09public static TipoDeCambio elTipo = null;%0A%09private ArrayList%3CIObserver%3E observers;%0A%0A%09private TipoDeCambio(double cambioEuroDolar) %7B%0A%09%09this.cambioEuroDolar = cambioEuroDolar;%0A%09%09observers = new ArrayList%3C%3E();%0A%09%7D%0A%09%0A%09public static synchronized TipoDeCambio obtenerCuenta()%7B%0A%09%09if (elTipo == null)%7B%0A%09%09%09elTipo = new TipoDeCambio(0);%0A%09%09%7D%0A%09%09return elTipo;%0A%09%7D%0A%0A%09public double getCambioEuroDolar() %7B%0A%09%09return cambioEuroDolar;%0A%09%7D%0A%0A%09public double getCambioDolarEuro() %7B%0A%09%09return 1.0/cambioEuroDolar;%0A%09%7D%0A%0A%09public void setCambioEuroDolar(double cambioEuroDolar) %7B%0A%09%09this.cambioEuroDolar = cambioEuroDolar;%0A%09%09notifyObservers();%0A%09%7D%0A%0A%09@Override%0A%09public void register(IObserver o) %7B%0A%09%09observers.add(o);%09%0A%09%7D%0A%0A%09@Override%0A%09public void unregister(IObserver o) %7B%0A%09%09observers.remove(o);%0A%09%7D%0A%0A%09@Override%0A%09public void notifyObservers() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09for (IObserver observer : observers) %7B%0A%09%09%09observer.update();%0A%09%09%09%0A%09%09%7D%0A%09%09%0A%09%7D%0A%0A%7D%0A

Update TipoDeCambio.java