Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new project called StringManipulation.(write the program using visual studio)net programming. Make the main form look like the following: Step 1 Write the code

Create a new project called StringManipulation.(write the program using visual studio)net programming.

Make the main form look like the following:

image text in transcribed

Step 1

Write the code for the Count Vowels button click event. The subroutine should get the text from txtSentence and pass it to a function called CountVowels. The CountVowels should use a loop and count all the vowels in the sentence( CASE INSENSITIVE ) and return the count. The Count Vowels button click subroutine should then display a message box with the vowel count.

Write the code for the Count Words button click event. This is the same as the previous problem except you should count words instead of vowels.

Step 2

Write the code for the Break Apart button click event. The subroutine should get the text from txtRecord and pass it to a subroutine called BreakApartRecord. The BreakApartRecord subroutine should use a loop and break apart strRecord into fields and populate the txtField# textboxes. A field is delimited by a comma. Ignore anything after the 6th comma. The Break Apart button click subroutine should also clear txtRecord.

Be sure to trim any leading and trailing spaces from the fields.

*** There may be less than 6 commas in the field. For example: 1, 2, 3, Make sure you code handles this.

Write the code for the Format Phone Number button click event. The subroutine should get the text from txtPhoneNumber and pass it to a function called FormatPhoneNumber. The FormatPhoneNumber function should add parentheses around the area code and insert dashes before the prefix and trunk. The FormatPhoneNumber should return the formatted phone number. The Format Phone Number click event should update the text in txtFormattedPhoneNumber with that string.

Only format phone numbers that are 10 characters long.

1 String Manipulation Step 1 Sentence: Court Vowels Court Words Step 2 Record Break Apart Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Step 3 Enter Phone Number Formatted Phone Number Format Phone Number Clear Form Exit 1 String Manipulation Step 1 Sentence: Court Vowels Court Words Step 2 Record Break Apart Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Step 3 Enter Phone Number Formatted Phone Number Format Phone Number Clear Form Exit

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

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions