+import java.util.*;
-interface OperAng {
-
- public Angulo mas(Angulo f);
-
- public Angulo menos(Angulo f);
-
-}
-
-interface ComparaAng {
-
- public int compareTo(Angulo f);
-
-}
-
-class Angulo implements OperAng, ComparaAng {
+public class Angulo extends Observable implements OperAng, ComparaAng {
private int signo;
private int grados;
signo = -1;
else
signo = 1;
+ setChanged ();
+ notifyObservers ();
}
public void setGrados(int g) {
setSigno(g);
grados = Math.abs(g % 360);
+ setChanged ();
+ notifyObservers ();
}
public void setMinutos(int m) {
minutos = Math.abs(m % 60);
+ setChanged ();
+ notifyObservers ();
}
public void setSegundos(int s) {
segundos = Math.abs(s % 60);
+ setChanged ();
+ notifyObservers ();
}
public Angulo() {