Question: Create a program in java that evaluates User Logins for valid requirements To be valid, a User Login must contain at least one lowercase letter,

Create a program in java that evaluates User Logins for valid requirements

To be valid, a User Login must contain at least one lowercase letter, one uppercase letter, one digit and one of the following special characters: #@$!

Length must be at least five characters. Space, tab, and return are not allowed.

The program reads a string from the user.

Output. The program initially outputs results to the screen, in the following format: Login, validity, and errors if not valid.

Sample Output:

Login: Happy#@!888 (valid)

Login: go_t (invalid)

-- no uppercase letter

-- no digit

-- invalid special character

-- too short (minimum of 5 characters)

Once your program is complete and correct, change output to go to a report file, in the same format.

The program will have one class, named UserLogin, and the following methods: main default constructor, others if needed, greetUser (brief explanation of the program, written to the screen), readUser LoginFromUser, checkCase, checkLength, checkValidty, printUser LoginValidity (one UserLogin as above, with UserLogin, validity result, and error messages), addToReport (concatenates result of checking the current UserLogin to the report variable), and printReport (to file). Additional methods 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!