Question: Written in Java Programming Language We will design an authentication system where users will be granted access to certain resources. Create a class called com.secretcompany.Authenticate,

Written in Java Programming Language
We will design an authentication system where users will be granted access to certain resources. Create a class called com.secretcompany.Authenticate, Create an inteface called com.secretcompany.auth.Usr with the following methods. public String getPWO public String getUIDO public Integer get Empido (can be null!) Provide a public static method in Authenticate called isValidUser(Usr) to return where or not a Usr meets the following requirements. the id and pw must match one of the two values below the emp id between 2 - 11, inclusive. match any of these values, otherwise user is not valid. If getEmpId() is null, throw a new RuntimeException If the Usr does NOT meet these reqs, return false. "IGoode", "secrets" "HAckerman", "breachedi" Note how the code must compile at this point. Now, implement Usr with a class named com.secretcompany.users. RegUsr. Create a constructor that will set some attributes so different values of user id, password, and employee id can be tried. Do this as we did in class. In Authenticate, you may add add a main to test this code. Tests will test the following. Ensure Usr is an interface that will be implemented by some other class with the method names as specified. Pay attention to the casing which may have changed since we went over this. Ensure Usr is under the correct package. Ensure Authenticate exists under the correct package. Ensure that isValidUser is written properly and returns true and false properly. Ensure isValidUser properly throws a RuntimeException as specified. We will design an authentication system where users will be granted access to certain resources. Create a class called com.secretcompany.Authenticate, Create an inteface called com.secretcompany.auth.Usr with the following methods. public String getPWO public String getUIDO public Integer get Empido (can be null!) Provide a public static method in Authenticate called isValidUser(Usr) to return where or not a Usr meets the following requirements. the id and pw must match one of the two values below the emp id between 2 - 11, inclusive. match any of these values, otherwise user is not valid. If getEmpId() is null, throw a new RuntimeException If the Usr does NOT meet these reqs, return false. "IGoode", "secrets" "HAckerman", "breachedi" Note how the code must compile at this point. Now, implement Usr with a class named com.secretcompany.users. RegUsr. Create a constructor that will set some attributes so different values of user id, password, and employee id can be tried. Do this as we did in class. In Authenticate, you may add add a main to test this code. Tests will test the following. Ensure Usr is an interface that will be implemented by some other class with the method names as specified. Pay attention to the casing which may have changed since we went over this. Ensure Usr is under the correct package. Ensure Authenticate exists under the correct package. Ensure that isValidUser is written properly and returns true and false properly. Ensure isValidUser properly throws a RuntimeException as specified
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
