Takehome Quiz6

To Takehome Quizzes

IT 236 -- Client Interface Programming
Takehome Quiz 6

  1. (25 pts.) Write a Windows application that displays Lottery random numbers. The input textbox txtNumber contains the number of lottery numbers. The input textbox txtMax specifies the maximum value of the lottery numbers. The numbers are chosen between 1 and max inclusive, where max is the integer in the textbox txtMax. Output the lottery numbers in the listbox lstLotto.

    Write two TextChanged event handlers for txtNumber and txtMax that call a DisplayLottoNumbers function whenever either of the input textboxes are changed.

  2. (25 pts.) Write a Windows application that inputs the name of a text file in the textbox txtFileName and outputs display the number of lines, words, and characters in that file. Display the number of lines, words and characters in the textboxes txtLines, txtWords and txtChars, respectively. Allow for the possibility that there may be more than one space between words. Only consider files containing these characters: upper case letters, lower case letters, digits, punctuation, space, and the line feed/carriage return (LFCR) sequence at the end of lines. Hints:

    Show the Click event handler for the button with caption "Show File Into".

  3. (25 pts.) The zip file acrostic.zip contains the database acrostic.mdb, which has the single table WordTable. WordTable has the single column Words. Write a Console application using Method 3 that obtains one word at a time and sequentially concatenates the first letter of each word together to form a new word. Finally output the new word to an output file output.txt.

  4. (25 pts.) Write a Windows application that loads the words from WordTable (see Problem 3) into the combo box cboWords. When you select a word in the combo box, display this sentence in the textbox txtOutput: "You selected the word ???.". Replace ??? by the word that you selected.

    Show the Load event handler for the form and the SelectedIndexChanged event handler for the combo box.