write the algorithm and program to a method for validating the username and password. The algorithm is capable of the following: (HTML, CSS, and JavaScript.) The user has three chances; if the username and password match, the user is logged in; otherwise, the user's display account is locked. Assume that a list of usernames and their associated passwords exists. Each time a user enters an incorrect credential, the system should indicate what went wrong (i.e. User does not exist, or Incorrect password) Username: john, Password: smith Username: mary, Password: woods Username: steve, Password: jobs The program should be able to count the number of login attempts. If it reaches the maximum threshold of 3 incorrect credentials, it should disable the login button. If the user was able to log in with correct credentials(username and its corresponding password), use an alert to display ”successfully logged in!”. The program should be able to determine what goes wrong, for example, the ”user does not exist” only appears when the username does not match to the accounts inside the JSON, and ”Incorrect password” if the username is correct but the password for that username is incorrect.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 12E
icon
Related questions
Question
100%

write the algorithm and program to a method for validating the username and password. The algorithm is capable of the following: (HTML, CSS, and JavaScript.)

The user has three chances; if the username and password match, the user is logged in; otherwise, the user's display account is locked.

Assume that a list of usernames and their associated passwords exists. Each time a user enters an incorrect credential, the system should indicate what went wrong (i.e. User does not exist, or Incorrect password)

Username: john, Password: smith
Username: mary, Password: woods
Username: steve, Password: jobs

The program should be able to count the number of login attempts. If it reaches the maximum

threshold of 3 incorrect credentials, it should disable the login button. If the user was able to

log in with correct credentials(username and its corresponding password), use an alert to display
”successfully logged in!”.

The program should be able to determine what goes wrong, for example, the ”user does not exist” only appears when the username does not

match to the accounts inside the JSON, and ”Incorrect password” if the username is correct but the password for that username is incorrect.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,