Many computer systems are protected by requiring users to log in using a username and password. If the user enters the correct username and password combination, then they can be granted access to the system.

The following table shows the details of three users of a computer system:

Username Password
jlay P1z2aT0pping
mwhite BananaElephant72
jmunro iusDg34b1

1.Develop a program to allow a user to enter their username and password and be granted access to the computer system

  • a.When a user logs in, display a message welcoming them to the system
  • b.If a user enters an incorrect username/password combination, display a message telling them there was a problem with their details

2.Modify the program so that when it starts, the user is presented with two options

  • a.Option 1 should allow them to log into the system
  • b.Option 2 should allow them to create a new account. This will prompt the user to choose a username and password, and will add their details to the system.
    • i.The program should prevent a user from choosing an existing username
    • ii.All passwords must contain an upper case letter, lower case letter, and a number, and must be at least 8 characters long. If a password is not secure, the program should force the user to choose a more secure password

3.Modify the program so that when logging in, the user is given three opportunities to enter their password. Once the password has been incorrectly entered three times in succession, the account should be locked. Once locked, an account cannot be accessed.

4.Modify the program so that once the user has logged in, they have the option to log out or change their password. If the user chooses to change their password, the new password must meet the security criteria outlined in task 2.

5.Modify the program to keep track of the number of times a user has logged into the system, and display this information to the user once they have logged in.

6.Extend your program to keep track of the date and time of each users most recent log in, and display the last log in time to the user once they have logged in.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.