Clasified in Problems of Computers of Other Classes.
Written at Dicember 15, 2009 on
English with a size of 2,511 bytes.
... (Continue)
//A
public class Tempo{
private int hora, mins, segs;
int quant = 0;//B
public Tempo(){
quant++;
}public Tempo(int hora, int mins, int segs){
quant++;
setHora(hora);
setMins(mins);
setSegs(segs);
}
//C
public void solicita(){
String h = JOptionPane.showInputDialog("Informe a hora:");
String m = JOptionPane.showInputDialog("Informe os minutos:");
String s = JOptionPane.showInputDialog("Informe os segundos:");hora = Integer.parseInt(h);
mins = Integer.parseInt(m);
segs = Integer.parseInt(s);
}//D
public void imprime(){
String h, m, s;
if (hora < 10){
h = "0"+hora;
}else{
h = ""+hora;
}if (mins < 10){