Reference no: EM133577503
Assignment
Programming Assignment - Password Validity
The program can be written in JAVA or Python or C# or using (JavaScript and HTML/CSS).
Create a GUI for the following problem:
Create a GUI for changing a password.
There should be an entry box for user id. User Id can be anything like your email. No check or validation required. Cannot be blank.
There should be a Current Password entry box as shown in the picture below.
When you enter the password, password should not be visible (.....) as shown in the picture below.
There should be a New Password entry box as shown in the picture below.
When you enter the New password, password should not be visible (.....) as shown in the picture below.
There should be a Confirm Password entry box where you should re-enter the new password. Here also the password should not be visible.
There should be a BUTTON called "Change Password" as shown in the picture below.
The GUI does not have to be an exact match of the GUI below. You can have variations of the GUI as long as all functionalities are met.
When the button is clicked the password validity is checked based on the following conditions:
The current password and the new password should not be the same.
The password string entered in the New password box should be the same as the password string entered in the confirm New password box
The password should be at least 12 characters strong.
The password should contain EXACTLY TWO upper case letters.
The password should have EXACTLY TWO digits.
The password should contain EXACTLY ONE special character like $ or ! or %.
The password should not contain any spaces.
The password should contain all remaining lower case letters.
Read in a file oldpasswd.txt which has 10 old passwords stored in plain text including the current password.
Need to make sure that the new password entered in the box is not one of these old passwords.
The file oldpasswd.txt should have only 10 lines. If there are more than 10 lines an exception should be created.
The first line in the oldpasswd.txt should be the current password.
So what you entered in the GUI as current password has to match the password in the first line.
Now the new password once created and once accepted now gets written to the oldpasswd.txt and all the remaining 9 old passwords are pushed one line down and the 10th line (oldest password in the file) in the oldpasswd.txt is deleted.
So now you still have 10 old passwords in the file including what you entered in the GUI the new Password that got accepted as the first line and the second line is what you entered as the current password in the GUI and the remaining lines pushed down and last line deleted.
The GUI should ask for a password and then verifies that it meets the stated criteria. If it does it should print message "Password Accepted" in the result box. If not it should return a message as to what is wrong with the password and why it is not accepted in the result box. Only one reason needs to be displayed based on the order of errors given above.
So for example if the password being entered is MyNameP!, then in the GUI should display
MyNameP! - Password is not accepted. In the example password is displayed but no where on the GUI the actual password should be displayed.
Password is not 12 characters long.
Attachment:- Programming Assignment.rar