Question: Open Eclipse. create a program that will allow a user 3 attempts to login to a database for superstars. Define the following 3 sets of
- Open Eclipse.
- create a program that will allow a user 3 attempts to login to a database for superstars.
- Define the following 3 sets of accounts to validate the user's attempt to login (the user must login as one of these 3 people)
-
username1="jTatum", passcode1="bballStar2021"
username2="jLopez", passcode2="singerDancer2021"
username3="kChesney", passcode3="musicEntertainer2021"
-
- if the user's credentials match one of three sets stored in memory, the following 2 messages should be displayed:
- "Your login has been authenticated!!"
- "Welcome to the SuperStar private database!!"
- if the user's credentials do NOT match one of three sets stored in memory, the following 2 messages should be displayed:
- "Invalid Login Credentials"
- "Try Again..."
- If 3 unsuccessful attempts have occurred, the following message should be displayed:
- "Failed to login successfully with 3 attempts - No Access Granted"
- Define the following 3 sets of accounts to validate the user's attempt to login (the user must login as one of these 3 people)
* Use a while loop to accomodate the 3 attempts to login
*Use an if-else logic in your loop to validate the user's credentials, as well as a boolean flag to indicate if the attempt was successful
***Java use eclipse.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
