Help with code!
Can anyone help me fix this code. Yes it has to be in this format (method). Of course the simple way would to put it all under main. But I need it like this or close to.
import javax.swing.*;
public class Ola2
{
public static void main (String [] args)
{
Ola2 One_Rep = new Ola2();
System.out.println(One_Rep.My_Input());
}
public static void One_Rep()
{
double weight, reps, One_Rep;
}
public static double My_Input()
{
String My_Input;
double weight;
My_Input = JOptionPane.showInputDialog( "Enter weight lifted." );
weight = Double.parseDouble( My_Input );
double reps;
My_Input = JOptionPane.showInputDialog( "Enter # of reps lifted." );
reps = Double.parseDouble( My_Input );
double One_Rep = (Math.round(weight / (1.0278 - (.0278 * reps))));
JOptionPane.showInputDialog( null, "Your one rep max is: " + One_Rep );
}
}

