Can anyone help me put this code into seperate methods?
public static void Main(String[] args) {
String num1String = JOptionPane.showInputDialog(null, "Please enter your first number");
String num2String = JOptionPane.showInputDialog(null,"Please enter your second number");
String num3String = JOptionPane.showInputDialog(null, "Please enter your third number");
Double num1 =
Double.parseDouble(num1String);
Double num2 =
Double.parseDouble(num2String);
Double num3 =
Double.parseDouble(num3String);
JOptionPane.showMessageDialog(null, "The numbers you entered are: " + num1String + "," + num2String + "," + num3String);
double getSum = num1 + num2 + num3;
if (getSum > 100)
JOptionPane.showMessageDialog(null, "values have exceeded a sum of 100");
else
JOptionPane.showMessageDialog(null, "The sum is " + getSum);
double getAverage = num1 + num2 + num3 / 3;
JOptionPane.showMessageDialog(null, "The average of your numbers is " + getAverage);
}