Can anyone translate this to java code, pls?
Create a complete Java application that meets these requirements:
1. The program has an opening comments section (using block comments) with the file name, date, your name,
and purpose of the program. (5 pts.)
2. Organize your program into sections for declaring variables and constants, input, processing, and output as
much as possible. Add comments denoting these sections. (5 pts.)
3. In the declaration section, declare all variables and constants used in the program. Use the most appropriate
data types for all variables and constants. The Army’s qualifying time to run 2 miles for a male is 16 minutes and
for a female is 19 minutes. Enter these times as constants in your program. (20 pts.)
4. Make your program user-friendly by providing an opening explanatory message using JOptionPane. The program
tests whether a male or female passes the Army running test. (10 pts.)
5. In the input section, ask the user to enter M for a male or F for a female candidate using JOptionPane. Then ask
the user to enter the time (in decimal minutes) for the candidate’s 2 mile run. (20 pts.)
6. In the processing section, determine if the candidate passes the test or not. (20 pts.)
7. In the output section, display the candidate’s gender (M or F), the candidate’s time, and the word PASS or FAIL
as appropriate. The output should be user-friendly (that is, self-explanatory, neat, and organized). (20 pts.)