I'm supposed to create methods, but I don't know how to :(. All inputs and outputs should be done in the main method and calls to the methods should be done for computation. Can someone please show me how? Thanks.
I have to do it on this program:
(Actually there's more programs, but I'll just apply what ya'll post here on the other ones}
import java.io.*;
public class Temperature {
public static void main (String[] args)throws IOException {
BufferedReader dataIn=new BufferedReader (new InputStreamReader (System.in));
double celsius=0.0, fahrenheit=0.0;
String TextInput;
System.out.print ("Input a temperature in Celsius: ") ;
TextInput=dataIn.readLine () ;
celsius=Integer.parseInt (TextInput) ;
TextInput=dataIn.readLine () ;
fahrenheit=celsius*9/5+32;
System.out.println ("Fahrenheit is: "+fahrenheit) ;
}
}