Question: PhoneNumberConversion First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then
"PhoneNumberConversion"
First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).
Then create a new Java application called "PhoneNumberConversion" (without the quotation marks) based on the Horstmann textbook chapter 2 programming exercise called Business, P 2.23 on page 75, in the section on Programming Exercises near the end of Chapter 2, before the answers to the self-check questions.
Request the ten-digit phone number from the user at the command line.
The following pseudocode describes how to turn a string containing a ten-digit phone number (such as "4155551212") into a more readable string with parentheses and dashes, like this: "(415)555-1212". Take the substring consisting of the first three characters and surround it with "(" and ") ". This is the area code. Concatenate the area code, the substring consisting of the next three characters, a hyphen, and the substring consisting of the last four characters. This is the formatted number.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
