import javax.swing.JOptionPane;

public class Cliente2 {
    
    public static void main(String[] args) {
        String line;
        int m;
    
        String tipoT1;
        String tipoT2;
        
        Termometro tr = new Termometro();
        line = JOptionPane.showInputDialog("temperatura?");
        m = Integer.parseInt(line);
        tr.misura(m);
        tipoT1 = tr.tipo();

        line = JOptionPane.showInputDialog("temperatura?");
        m = Integer.parseInt(line);
        tr.misura(m);
        tipoT2 = tr.tipo();
    
        if (tipoT1.equals(tipoT2)) 
            System.out.println("La temperatura si e' mantenuta");
        else 
            System.out.println("Attenzione, la temperatura e' cambiata");

        System.exit(0);
    }

}
