Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a program called FullName.javathat will the full names of a person in the

ID: 3616873 • Letter: C

Question

Create a program called FullName.javathat will the full names of a person in the

form:

[ GivenName I. FamilyName].

You may assume that there is at leastone given name; there is only one middle

initial followed by a period(‘.’); at least one family name; all delimited by asingle

space (‘‘).

Your program should process the enteredfull name and output the given name,

middle initial, and family name inseparate lines. And the print the full name inthe

form:

[ FamilyName, GivenName I.].

Sample run:

Please enter full name: Moira Luisa F. delaCruz

Given Name: Moira Luisa

Middle Initial: F

Family Name: dela Cruz

dela Cruz, Moira Luisa F.

Explanation / Answer

please rate - thanks import java.io.*; public class untitled {     public static void main(String[] args)throwsIOException     {   int i;         Stringfirst,last,initial,name;         BufferedReader input=newBufferedReader(new InputStreamReader(System.in));         System.out.print("Pleaseenter full name: ");        name=input.readLine();         i=name.indexOf('.');          first=name.substring(0,i-2);          initial=name.substring(i-1,i);          last=name.substring(i+2,name.length());          System.out.println("Given Name: "+first);          System.out.println("Middle Initial: "+initial);          System.out.println("Family Name: "+last);          System.out.println(last+", "+first+""+initial+".");             } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote