Question: The LoginAuthenticator Class Create a class library project named LibLoginAuthenticator that contains a class named LoginAuthenticator. The LoginAuthenticator class must support the following features: The

The LoginAuthenticator Class
Create a class library project named LibLoginAuthenticator that contains a class named LoginAuthenticator. The LoginAuthenticator class must support the following features:
The class defines a public string read/write property named Username which gets/sets the Username for the authenticator.
The class defines a public string property named Password which sets the Password for the authenticator. The get part should be private.
The constructor for the class should set the initial values of Username and Password to null.
The class defines a public method named Authenticate with no parameters which returns a bool? (nullable bool) value.
If either Username or Password is null, the method should return null to indicate that not all fields were provided.
If both Username and Password are not null, then the method should compare the username and password against 3 hardcoded sets of values in the method. Be sure to include one where the username is john and the password is doe (all lowercase). If a hardcoded username/password pair is found, the method returns true. Otherwise the method returns false.

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!