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 3 implementations of this interface in the same package:
StrictValidateUserStrategy insists on passwords that are at least length 6, uses only letters, numbers, or the special
characters !_=@%, and requires at least 1 uppercase letter, 1 lowercase letter, 1 special character, and 1 numeric digit.
ModerateValidateUserStrategy insists on passwords that are at least length 3, uses only letters or numbers, and
requires at least 1 letter and 1 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 non-empty username and non-empty 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 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 Programming Questions!