Question: Write an entire, complete Java program that prompts the user to input their first, last, and middle names ( separately and in that order )

Write an entire, complete Java program that prompts the user to input their first, last,
and middle names (separately and in that order), then prints out their name in the following form:
"Luebke, David P." Note that you should abbreviate their middle name (including the period).
This program will have to be in a class named NameGames. For brevity you may omit the
"good programming practices": comments, printing a legend, echoing input, etc. You may use
the back of this page if you need more space.
Your program should go through the following steps:
1) Create a Scanner object
2) Prompt for and obtain the three names
3) Find the middle initial from the middle name (hint: you can use substring())
4) Create the final form of the name (i.e. "Luebke, David P.")
5) Print the output

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 Finance Questions!