Question: Phone String Palindrome Conversions JAVA Progrken You will create a main application with static user defined methods that will determine if an inputted phone number

 Phone String Palindrome Conversions JAVA Progrken You will create a main

Phone String Palindrome Conversions JAVA Progrken You will create a main application with static user defined methods that will determine if an inputted phone number (as a string) is a palindrome or not. You will.convert the input to different types, dependent upon what you want to do with it. Use string string tokenizer, string buffer formatting, and long integer methods whenever possible and use them as efficiently as possible). 95 The user will be properly prompted and will input a phone number as a string with a string input stream and send the string to user-defined static methods. The phone numbers will be inputted in this exact form (999) 999 9999 This string will first be sent to a method that will remove all spaces and symbols from its string to forma string of only digits. Use a StringTokenizer to eliminate the spaces & symbols. StringBuffets are more efficient than Strings, so use a Stribute to put the digits back together. Change the string buffer back to a string and this new string will be returned to main. You will then send the string of digits (with all the symbols and spaces removed) to a method that will see if it is really a palindrome or not Again change a copy of the string to a string buffer so you can reverse it all at once. Then change it back to a string and see if they are still the same string of digits as the argument string. Retam the booleat result Backin main, print whether your phone number (as a string of digits) is a palindrome or not. The string of digits will now be sent to a method to convert it to come form. The method will convert the string of digits to a long integer (since it isa lo dicit cumber, makeita tong integer). Now either use Numberkomst or a Decimalt omat to format the long integer with commas. For example: 5,186,294,822. Now return the resulting formatted string of digils and commas back to main Back in main, print the labeled comma phone number. Use the following data when you run your program: (130) 188-1031 (518) 629-4822 (565) 677-6565 Make sure you follow directions and use commands and concepts from this chapter. Document your program with at least name, exercise number, and at least 4 lines explaining what the program does You will also add comments to at least 5 individual lines in the program (comment lines not totally obvious to k novice programmet, especially on objects and method call). Run your program with the data above Sare (or Copy and Paste) the Console running of your program into a plain output.Ext text file. Submit your jara source code main program and the output.txt saved

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!