View
 

Lab 7: Password

Page history last edited by Mr. Kretsch 5 months, 2 weeks ago

Name: _________________________________

Objective: String Manipulation

Instructions

 

  1. Create a program that has two text fields for input: name and social security number, and a button.
  2. 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.
    1. Be sure to check that the social security number is of the legal size, display a message box if it isn't
  3. For example,
    1. If the user entered "Randy Thomas", and "023652582", the password should be RAND2582
    2. If the user entered "Barak Obama", and "123456789", the password should be BARA6789

Extra credit 

 

  1. If the first for letters in the name end with spaces, trim the spaces from the password
  2. For example,
    1. If the user entered "Roy Rogers", and "019452099", the password should be ROY2099
    2. If the user entered "Bo Jackson", and "245834944", the password should be BO4944

Grading 

Feature  Points  Out of  Notes
Name     
Social Security   2  
Password   5  
Trimmed name (Extra Credit)   3  
Total   8  

 

Notes

 
 
 
 
 
 

 

 

 

 

Comments (0)

You don't have permission to comment on this page.