Question
Write a java program that will 1. welcome the user, 2. prompt the user to enter a name, 3. echo the name entered, 4. display
Write a java program that will
1. welcome the user,
2. prompt the user to enter a name,
3. echo the name entered,
4. display the numbers 11 to 13 (inclusive) twice, as shown in the example,
5. thank the user by name for using the software.
6. Use the following techniques:
use println commands for prompts
use println command(s) to print the vertical number list,
use print command(s) to print the horizontal number list
use the printf command(s) with format specifiers to print the final two numbers.
NOTE: your printing must match mine including the periods(.), the dashes (-), readability and the use of the users name. Use nextLine to read the name Use nextDouble to read the last 2 numbers Have 1 String variable to store the name Have 2 double ( NOT Double ) variables to store the user entered numbers
7. After your program is complete and it compiles without errors and it is tested, and it works:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Java Lab 2 Sample output (blue = your program, bold black = user input)
Welcome to this software test!
What Is Your name? John Smith
Hello John Smith.
First, I will list numbers in two different ways:
11.
12.
13.
11 - 12 - 13
John Smith, please enter 2 whole numbers:
25
33
Your numbers with 3 decimals: 25.000 and 33.000
Goodbye John Smith. Thanks for testing our software.
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