Question: Part 2: Programming (15 points) Write a complete Java program in a source file to be named Assignment3.java. The program asks the user for their

 Part 2: Programming (15 points) Write a complete Java program in

Part 2: Programming (15 points) Write a complete Java program in a source file to be named Assignment3.java. The program asks the user for their full name (first middle last - using the nextLine method) as one string in any combination of upper and lower case. Your task is to output the name in the following variations: 1) Just Initials: Print just the initials in upper case letters separated by periods. 2) Last Name First With Middle Initial: Print the last name in lower case with the first letter capitalized, followed by a comma and the first name in in lower case with the first letter capitalized and then the middle initial capitalized followed by a period 3) First and Last Name Only: Print the just the first name followed by the last name- all names with first letter capitalized. Note: Your program has to check for middle name and if the user does not have a middle name your program has to print the variations without the middle name. See the sample output below Important: You will not get points if you do not read the string as one line (Use the nextLine0 method, not the nexto method). You cannot use the Scanner class to extract different parts of the name. You have to use the methods n String class. Note The Java API (Application Programming Interface) documentation lists the classes and methods of the Java ibrary. Go to questions. Specifically, you may find some of the following String methods useful: chatAt, concat, contains, indexOf, isEmpty, lastindexOf, length, substring, toLowerCase, toUpperCase, etc. e) and find out the methods you may need to answer the Sample Output, with user input in red What are your first, middle and last names? Ada Lovelace Initials Last Name First Lovelace, Ada First and Last: Ada Lovelace : A.L What are your first, middle and last nomes? SALLY rachel riDE Initials Last Name First : Ride, Sally R First and Last Sally Ride : S.R.R Note: Do not use any Java language or library features that we have not already covered in class. For example, do not use arrays or ArrayLists

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