make a GUI application in java
Question: Create a console-based program and a GUI application, which justifies the following conditions: The Main() method prompts the user for an integer value and, in turn, passes the value to a method that squares the number and a method that cubes the number, The Cube() method should call the Square() method, and The Main() method displays the results returned from each of the other methods.
Include comments in code section. Code this in java programming.