Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a Windows application that simulates entering a password. The user enters

ID: 3647754 • Letter: W

Question

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:



Tips

Best practice: First make sure to read through this week's lecture and try it yourself! Then, you'll be in good shape for this exercise.

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
END OF PART A

Explanation / Answer

#include #include main() { char a[100], b[100]; printf("Enter your password "); gets(a); printf("Enter your password again "); gets(b); if( strcmp(a,b) == 0 ) printf("passwords match. "); else printf("passwords are different. "); return 0; }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote