Question: Write a MIPS program that asks the user for a string and validates it as a password according to the rules given below. If the
Write a MIPS program that asks the user for a string and validates it as a password according to the rules given below. If the user enters a blank line New Line character as the first byte the program exits. Otherwise, it should continue asking for passwords and validating them. Note that the user can type anything, so you must check for validity.
Rules:
Passwords must be a minimum of characters long.
They must contain at least one uppercase letter.
They must contain at least one lowercase letter.
They must contain at least one digit
They must not contain any characters which are not alphanumeric ie anything which is not an uppercase letter, lowercase letter, or digit
Output text for valid and invalid passwords:
If the entered password is valid, output "Valid password."
If the entered password is missing a digit, output "Invalid password missing
digit."
If the entered password is missing an uppercase letter, output "Invalid passwordmissing uppercase letter."
If the entered password is missing a lowercase letter, output "Invalid password missing lowercase letter."
If the entered password is too short, output "Invalid password length too
short: followed by the length of the entered password and a period character.
If the entered password contains an invalid character, output "Invalid password
invalid character: "followed by the invalid character and a period character. If an
entered password contains multiple invalid characters, only print the first one encountered.
Don't do everything in the program loop. Write little functions as needed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
