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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started