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 8 characters long.
They must contain at least one upper-case letter.
They must contain at least one lower-case letter.
They must contain at least one digit (0-9)
They must not contain any characters which are not alphanumeric (ie, anything which is not an upper-case letter, lower-case 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 upper-case letter, output "Invalid password-missing uppercase letter."
If the entered password is missing a lower-case 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!