Angle to Radians and Calculate the Cosine

I need to finish this code, to prompt an angle in radians and calculate its cosine.

Im a beginner and this is all very confusing still. Please help??? Anyone?

import javax.swing.*;

import java.text.*;

public class SimpleTrig{

public static void main(String[] args) {

// I need this code...

System.exit(0);

}

}

1 Declare a variable angle as double

2 Declare a variable angleCosine as double

3 Declare a variable inputStr with data type String

4 Write a code to allow ask a user to type in the angle, store it to inputStr. Then convert inputStr to the corresponding data type of angle, and store the result to variable angle

5 Write a code to compute cosine of the variable angle and store the result to angleCosine. Please use Math.cos(angle) method to compute the cosine of this angle.

3.6. Please use JOptionPane.showMessageDialog to display the value of angleCosine on the screen.