I got this assignment due tonight and I suck at Visual Studios 2010. Can someone who has ease with this please help. I'm supposed to design this program in ConsoleApplication about Phone Numbers:

You are writing a program and you need to store telephone numbers. You'd like to be user-friendly, and let the users enter their telephone number in whatever format they like with parentheses and dashes, so long as they enter 10 digits.

Assume that they won't enter any other characters. The user will only enter ( ) - spaces and numbers.

So, these would all be valid inputs,

6121234567

(612)123-4567

612 123-4567

612-123-4567

(612) 1234567

Write a program which validates a phone number entered. In your validation, you'll need to remove all the extra characters ( ) - and spaces from the user's input. And, you'll need to check that there are 10 digits.

If the phone number doesn't have 10 digits, ask the user to re-enter their phone number.

You'll most likely want to put the validation into a function.

Once they have entered a valid phone number, remove all the extra characters and store the phone number in an Integer variable, and display it.

You've used the function Val to convert Strings to numbers before. What does that function do if the argument isn't a number? How does this code behave? How could you use the Val function in your program? There is a way of validating the user's input has 10 digits using the Val function - there is an equally correct way without using the Val function.

So, if your user enters,

(612)- 123 4567

Your program would display

Thanks for your input

6121234567



This is the first part and the second part is Part 2: Camel Case method name generator. For example: convertStringToInteger(), printAllEmployeeData(), getUserInput().

Write a program which asks the user what a method will do. The user will enter a string which looks like this,

Convert string to integer

or

Print all employee data

Your program will take that input, and convert it to a method name in camel case. So, it will convert

Convert string to integer ----> convertStringToInteger

Print all employee data ----> printAllEmployeeData

Display the camel case method name to the user.

There's more than one way to do this. Hints:

Part 1: There's some variations of how to do this, but here's one way.

You want to change the first letter of each word to uppercase, except the first word. How can the computer know what parts of the string represent a word? What character separates words in a string?

You'll be capitalizing the first letter of each word. The string you are processing can have any number of words. What type of programing structure is appropriate to do the same task for a number of items?

One way to solve this problem is to have your program search the string for a space. What function can you use to do that? (Check the Visual Basic String Library Functions and Example Program document in the content section) Then, it will use the Substring function to cut the string into three parts - the string before and the space, the character after the space, and the rest of the string. For example, you would divide this string

"Write the data to a file"

to

"Write"

"t"

"he data to a file"

Note the space after the first word isn't included in any of the string. You can use ToUpper on the string containing the T. Then, join the strings back together to get

WriteThe data to a file

Now you need to think of a way to repeat this process. What structure repeats code? What condition do you want to check to determine when you are done processing the string? Hint: the Contains function may be helpful.

So, you should end up with a string that looks like this.

WriteTheDataToAFile

And now you can use Substring and ToLower to take the first character, make it lowercase, and rejoin it to the rest of the string.



Thank you very much for your help. Ima keep working on it but if someone stumbles upon this and can help me out it would greatly be appreciated. All i would need is the code from the visual basics screen. Thank you once again.