Question: Core Lab 2.11 [4 lab points] Using the string for this Co methods in the class LabCh025tringMethods, here are the specifications ore Lab. You will

 Core Lab 2.11 [4 lab points] Using the string for this

Core Lab 2.11 [4 lab points] Using the string for this Co methods in the class LabCh025tringMethods, here are the specifications ore Lab. You will also need to declare some integer and String variables to hold various pieces of information. Think carefully what you do in what order to prevent redoing certain statements. 1. From the keyboard, prompt for and type in a name in last name, first name order, with a comma after the last name and a space after the comma. Example: Doe, Jane. Your program can assume a user will always type a name with all the correct information included. Well learn later how to catch exceptions to that rule. (To see what happens when there are errors, enter a name without a comma, and enter the empty string by pressing enter at the prompt.) 2. Print the name in first name and last name order. Example: Jane Doe You have to figure out what methods to use. 3. Print how long (how many characters) the first and last names are with a message identi- fying each part of the name and length. Example: with "Jane Doe" as the name, this step will produce the output: Jane: 4 characters, Doe: 3 characters 4. From the keyboard, type in a phone number in this format: (303) 123-4567. Extract the area code and print it. Your program can assume a user will always type a phone number

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!