Ask the user for five names. Output those names. Put an integer before each name to indicate the ordering. Write in java and use test case 1 and 2 as an example.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter7: String Manipulation
Section: Chapter Questions
Problem 15E
icon
Related questions
Question
Ask the user for five names. Output those names. Put an integer before each name to indicate the ordering. Write in java and use test case 1 and 2 as an example.
Test Case 2
Enter five names Nn
Enter friend 1\n
Jerry ENTER
Enter friend 2 \n
Elaine ENTER
Enter friend 3 \n
George ENTER
Enter friend 4 \n
Kramer|ENTER
Enter friend 5 \n
Newman ENTER
Here are all of those names \n
Friend 1 is Jerry \n
Friend 2 is Elaine \n
Friend 3 is George \n
Friend 4 is Kramer \n
Friend 5 is Newman \n
Transcribed Image Text:Test Case 2 Enter five names Nn Enter friend 1\n Jerry ENTER Enter friend 2 \n Elaine ENTER Enter friend 3 \n George ENTER Enter friend 4 \n Kramer|ENTER Enter friend 5 \n Newman ENTER Here are all of those names \n Friend 1 is Jerry \n Friend 2 is Elaine \n Friend 3 is George \n Friend 4 is Kramer \n Friend 5 is Newman \n
Test Case 1
Enter five names \n
Enter friend 1 \n
Bill ENTER
Enter friend 2 \n
Steve ENTER
Enter friend 3 \n
Mark ENTER
Enter friend 4 \n
Elon ENTER
Enter friend 5 \n
Henry ENTER
Here are all of those nameS \n
Friend 1 is Bill \n
Friend 2 is Stevel\n
Friend
is Mark \n
Friend 4 is Elon \n
Friend 5 is Henry \n
Transcribed Image Text:Test Case 1 Enter five names \n Enter friend 1 \n Bill ENTER Enter friend 2 \n Steve ENTER Enter friend 3 \n Mark ENTER Enter friend 4 \n Elon ENTER Enter friend 5 \n Henry ENTER Here are all of those nameS \n Friend 1 is Bill \n Friend 2 is Stevel\n Friend is Mark \n Friend 4 is Elon \n Friend 5 is Henry \n
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage