Question: l * * factorial method. A . Requirements Please write a Java program named as DemoYourLastName, so that it runs as follows: As the figure

l**factorial method. A. Requirements
Please write a Java program named as DemoYourLastName, so that it runs as follows:
As the figure below, it requests the user to enter his/her name via a pop-up window.?
Enter your name:
John Smith
javac D\epsilonjava DemoAN
javac DemoAN.java
java DemoAN
java DemoAN
After the user provides his/her name and click OK button, the program requests the
user to provide his/her income as follows via a pop-up window:java DemoAN
javac DemoAN.java
java DemoAN
java DemoANAfter the user provides the income and clicks OK button, the program outputs
information as follows via a pop-up window: java
javac DemoAN. java
.java DemoAN
javac DemoAN.java
java DemoAN
B. Submissions
Your program (DemoYourLastNameijava)[80 marks]
Screenshots to show all the 3 steps [20 marks]
*8
public class FactorialDemo
{{ int number; // To hold a number input = JOptionPane.showInputDialog("Enter a "+ number = Integer,parseInt(input); JOptionPane. showMessageDialog(null, System.exit(0);l** the factorial of its argument, which is assumed Bparam n The number to use in the calculation.*/{ return 1; // Dase case return n * factorial(n -1);}
 l**factorial method. A. Requirements Please write a Java program named as

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!