D W

D W

  • NA
  • 12
  • 21.1k

Need a Windows application that simulates entering a password

Oct 25 2012 12:25 AM
Write a Windows application that simulates entering a password. The user enters a password and clicks Next. Then, the user types the password again and clicks Continue. The program will display a Message Box that displays either that the passwords match or that they don't match.

Sample output:



I type in Bob in the password field and click Next.



I type in Bob in the second password field and click Continue.



Message displayed if the passwords match:



Message displayed if the passwords are different:




 Pseudocode: 

Next Button Event Handler Method

If the first password textbox is not blank

Make visible the second password textbox, the Done button, and the labels
Else

Put "You must enter a password" in the label
End-If
Done Button Event Handler Method

If the first password text box is not empty

If the first password text box equals the second password textbox

Display the message "Passwords are the same"
Else

Display the message "Passwords are different"
End-If
Else

Display the message "You must enter a password"
End-If

Answers (3)