Question: / / Create a static method called formattedNameFromArray / / It should have one parameter, an array of Strings and it should return a String

// Create a static method called formattedNameFromArray
//It should have one parameter, an array of Strings and it should return a String
// This array will contain the names of an individual, in order, and may or may not start with a title (either Dr, Miss, Ms, Mr, Mrs, or Rev)
//* there may be 0 or more subsequent names
//* the final string in the array will be the surname (or only name - e.g. 'Bono' or 'Cheryl')
//
//if they have a title, provide all forenames (if any) in initialised format then the surname as follows
//* with title: Miss. A. B. Stark
//* with title: Mrs. Lannister
//* with title: Ms. D. Targaryen
//if they do not have a title, print the entire first name, subsequent initials and surname as follows:
//* without title: Margaery L. Tyrell
//* without title: Jon Snow
//* without title: Shae

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!