Create a Java Class file named PayCalculator.java with a main()method. Add the following methods to your class:
- public static String getName() { } prompts the user for theirname using JOptionPane.showInputDialog() and returns the name.
- You will call this method from main() and “catch” the returnedString variable. For debugging purposes, print the name to theconsole using the method System.out.println()
- public static double getHours() { } prompts the user for thenumber of hours worked using JOptionPane.showInputDialog(),converts the value to a number, and returns the hours worked.
- You will call this method from main() and “catch” the returneddouble variable. For debugging purposes, print the hours
OROR
- You will call this method from main() and “catch” the returneddouble variable. For debugging purposes, print the hours