Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / First Letter: Display first letter of each word that is entered by the user

First Letter: Display first letter of each word that is entered by the user

Statistics

First Letter: Display first letter of each word that is entered by the user. Words are defined as being separated by a single space character. Words do no need to be made up of exclusively letters. For example 1000 should be treated as a word, and its first letter is 1.First Q:Show the position of the first Q in the string. Count the way non-programmers count. If there is no Q in the string then display None.Vowels Count the number of each of the five vowels in the string. For purposes of this application we will not treat Y as a vowel.

The results should be in a group box.

 

Characters Entered:

Create list box that shows all of the characters that are used in the string.

Treat lowercase letters in the string as uppercase letters. For example a t in the string should be displayed as a T in the list box.

Show each character in the list box only once. For example if there are five ts the in string there should only be one T is the list box.

Do not include the space character in the list box. The contents of the list box should be in sorted order. The results should be in a group box.

 

Telephone:

Translate the letters in the string into numbers using the system on a standard American telephone. For example, 555-GET-FOOD becomes 555-438-3663. Both upper and lower case letters should be translated into numbers. All non-letters should be displayed as is. The mappings are:

  • A, B, and C become 2
  • D, E, and F become 3
  • G, H, and I become 4
  • J, K, and L become 5
  • M, N, and O become 6
  • P, Q, R, and S become 7
  • T, U, and V become 8
  • W, X, Y, and Z become 9

The results should be in a group box.

 

Other Requirements

  • Your application should work no matter what characters are entered or removed.
  • Include a C&lear button that clears the text box and sets the focus to the text box.
  • Include an E&xit button that exits the application.
  • Your results should be in larger, easy to read fonts. See the screenshot for an example.
  • There should be no accept button.
  • You may only use the techniques and functions that we have learned so far in this class. You cannot Google a magic one line solution to one or more of these problems. For example you cannot split a string.

 

Notes and Hints

  • Remember that all the results should update as the user types each character. While this does use more CPU resources, from a programming standpoint this isn't any more difficult. In fact it's a little easier because there is one less button.
  • It is far easier to re-analyze the entire string from scratch than to try to determine which character(s) were added or removed. For example, it's better to reset all the vowel counters to zero and count them all again.
  • There are a number of different, yet still correct, ways to do the telephone string.

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions