| |
Lab 7: Password
Page history
last edited
by Mr. Kretsch 5 months, 2 weeks ago
Name: _________________________________
Objective: String Manipulation
Instructions
- Create a program that has two text fields for input: name and social security number, and a button.
- When the user clicks the button, create and display a password for the name that is made up of the capitalized letters of the first four letters in the users name and the last four digits in his or her social security number.
- Be sure to check that the social security number is of the legal size, display a message box if it isn't
- For example,
- If the user entered "Randy Thomas", and "023652582", the password should be RAND2582
- If the user entered "Barak Obama", and "123456789", the password should be BARA6789
Extra credit
- If the first for letters in the name end with spaces, trim the spaces from the password
- For example,
- If the user entered "Roy Rogers", and "019452099", the password should be ROY2099
- If the user entered "Bo Jackson", and "245834944", the password should be BO4944
Grading
| Feature |
Points |
Out of |
Notes |
| Name |
|
1 |
|
| Social Security |
|
2 |
|
| Password |
|
5 |
|
| Trimmed name (Extra Credit) |
|
3 |
|
| Total |
|
8 |
|
Notes
Lab 7: Password
|
|
Tip: To turn text into a link, highlight the text, then click on a page or file from the list above.
|
|
|
Comments (0)
You don't have permission to comment on this page.