Hello, I am stuck as to what to do from here in this hopefully simple prog
807599Mar 6 2007 — edited Mar 6 2007I am trying to write a program that the user can enter any number in any unit of these (seconds, minutes, hours, centihours, or years). Then it should ask what to convert it into then the user could choose to convert it to seconds, minutes,hours, centihours, or years.
Any ideas?
This is what I have so far but I am stuck as to what to do from here:
import javax.swing.JOptionPane;
public class converttime{
public static void main (String[] args){
double inputNum = Double.parseDouble(JOptionPane.showInputDialog(null,"Enter a number: "));
Sring unit = JOptionPane.showInputDialog(null,"What unit is the number entered in? ");
String convert = JOptionPane.showInputDialog(null, "Do you want this converted into seconds, minutes, hours, centihours, or years?");
}
}