Question: Write a Java program to display a dialog box that asks you to enter your name and the year of birth as shown the first
Write a Java program to display a dialog box that asks you to enter your name and the year of birth as shown the first picture:
The program displays in a dialog box, your name and the sum of digits in your year of birth. For example, if you entered your name as PK and the year of birth as 1999, the sum of digits in the year of birth will be 1+9+9+9 = 28 and the output will be as shown the second picture:
A properly documented source code (.java files) (Do not need to add comment in each line, but you must explain the code appropriately).
Input Enteryour name. OK Cancel Input Enter your year of birth in yyyy format. OKCancel
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
