Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java 2. In a different java file (for example FunWithNames.java) convert the following pseudocode to Java code. Please remember to make your solution generic

Using Java image text in transcribed
2. In a different java file (for example FunWithNames.java) convert the following pseudocode to Java code. Please remember to make your solution generic (call length method to get the number of characters in the String: call indexof method to compute the index of a character) and the output "user friendly" Example 3.6 may be helpful: a Store your name (frst and last together separated by one space ie. "Mary Flower) in a String b. Display myFullName in all upper case, display myFullName in all lower case, and next display the c. Display the number of characters in the myFullName object (ie. My name is Mary Flower and it is 11 d. Extract the first name from the myFulIName object and store it in the myFirstName String object object referenced by the reference variable myFullName. original myFullName. characters long) (utilize indexof method to compute index of space and use this information in the call to e. Extract the last name from the myFullName object and store it in the myLastName String object (use f. Display myLastName followed by comma followed by myFirstName (ie. My inverted name is g. Store your friend's name (first, middle, and last together separated by one space ie "John Henry h. Display number of characters in the friendsFullName object (ie. My friend's name is John Henry Smith i Extract the first name initial from the friendsFullName object and store it in the j Extract the last name initial from the friendsFullName object and store it in the k. Display a message showing yours and your friend's initials (ie. MF and JS are friends) substring) a similar technique as above) Flower Mary) Smith") in a string object referenced by the reference variable friendsFullName. and it is 16 characters long) friendsFirstNamelnitial char friendsLastNamelnitial char (utilize lastIndexof method to get the index of the last space)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

Explain the key components of an assessment center (AC).

Answered: 1 week ago