Question: Create a Java interface named IValidateUserStrategy. It should have a single method definition, validateUser. Create 3 implementations of this interface in the same package: StrictValidateUserStrategy
Create a Java interface named IValidateUserStrategy. It should have a single method definition, validateUser.
Create implementations of this interface in the same package:
StrictValidateUserStrategy insists on passwords that are at least length uses only letters, numbers, or the special
characters @ and requires at least uppercase letter, lowercase letter, special character, and numeric digit.
ModerateValidateUserStrategy insists on passwords that are at least length uses only letters or numbers, and
requires at least letter and numeric digit.
NullValidateUserStrategy insists on usernames and passwords that are not empty. Currently, when adding a new user,
you may add one that has no username or password leave the fields empty
You will find that you can login as an admin by entering no credentials. This strategy allows any nonempty username and nonempty password comprised of only letters and numbers of any length.
Use your new strategy to check login attempts in your main class.
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
