Answered step by step
Verified Expert Solution
Question
1 Approved Answer
l * * factorial method. A . Requirements Please write a Java program named as DemoYourLastName, so that it runs as follows: As the figure
lfactorial 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 hisher name via a popup window.?
Enter your name:
John Smith
javac Depsilonjava DemoAN
javac DemoAN.java
java DemoAN
java DemoAN
After the user provides hisher name and click OK button, the program requests the
user to provide hisher income as follows via a popup 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 popup window: java
javac DemoAN. java
java DemoAN
javac DemoAN.java
java DemoAN
B Submissions
Your program DemoYourLastNameijava marks
Screenshots to show all the steps marks
public class FactorialDemo
int number; To hold a number input JOptionPane.showInputDialogEnter a number Integer,parseIntinput; JOptionPane. showMessageDialognull System.exit;l the factorial of its argument, which is assumed Bparam n The number to use in the calculation. return ; Dase case return n factorialn ;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started