Wyo VB Ch5Proj2 Specs
Write a program that allows the user to type his first name and last name into one text box. The user will type exactly one space between the first and last names. However, he may accidentally type leading spaces before his first name and trailing spaces after his last name. When the user presses the Enter key within the text box, his name will be displayed in the caption of a label following the format - LastName, FirstName - where there is a comma immediately after his last name and a single blank space following the comma. Furthermore, no matter what case the user types his name in, the output should be displayed with his first and last names properly capitalized. That is the first letter of each name should be uppercase and the remaining letters must be lowercase. Your program must use at least one loop and it must use one or more of the following string functions: Mid, Left, and/or Right. Your program must also include Clear and Exit command buttons.
Your program must follow the Coding Standards. You could lose many points for violating the Coding Standards (e.g. poor spacing, incorrect indentation, incorrect prefixes, etc.) Save the form (frmMain.frm) and project (Ch5Proj2.vbp) files in a newly created folder named Ch5Proj2. If you create the Excel test plan at school, save it in the same Ch5Proj2 folder.
Preconditions:
Staple your printouts in the following order:
Test
Plan - type into Excel
|
|
Possible Inputs |
|
Expected Outputs |
Reason
|
|
Whole Name |
|
Parsed Name
|
|
|
| 1. |
John_Doe |
Doe, John
|
normal input |
|
| 2. |
JOHN_DOE |
Doe, John
|
all uppercase |
|
| 3. | _j_doe____ | Doe, J | leading & trailing spaces, single letter first name, all lowercase | |
| blank
spaces are indicated by underscores Create A LOT more test items of your own! |
||||