Question
WHAT IS NEEDED FOR THIS QUESTION: Pseudocode and completed sections 3.1, 3.2 and 3.3 in a java code. A user will try logging in up
WHAT IS NEEDED FOR THIS QUESTION: Pseudocode and completed sections 3.1, 3.2 and 3.3 in a java code. A user will try logging in up to 3 times, they have to enter the correct username and password, which is listed in the user.txt ( listed at the bottom) file (username: ntesla password: IambetterthanEdison)
Read each line, and store each information by choosing the correct data type, and define proper variable names for your Java program to work.
- Authentication (Username & Password)
Your first task is to create a Login section for the user that wants to explore Trip Planner app. Ask the user to input correct username and password. Your Login section should look as follows:
Welcome to Trip Planner!
Please enter correct credentials to log in. Username: [username] Password: [password]
- Verifying Credentials from user
Once the user enters username and password, verify if the user entered correct credentials. Meaning, the user should input the same username and password that was documented in the user.txt file in order to be correct.
- If the user fails to enter correct credentials, your program should let the user retry entering username and password again, and print as follows:
Welcome to Trip Planner! Sorry, you entered invalid credentials. Try again.
Username: [username]
Password: [password]
- The user should only have 3 opportunities to enter valid credentials, failing to do so, your program should direct you to Section 3.3.
- If the user succeeds, your program should direct you to Section 3.4.
- Page Blocked
After 3 opportunities are given, your program should terminate by displaying the following message:
Sorry, you are temporarily blocked from the platform. Please try again in a couple of hours.
user.txt file contains: name, username, password, and budget to spend, and travelers points; in this consecutive order.
Nicolas Tesla ntesla IambetterthanEdison 3000 0
What is expected: a Java code as well as a Pseudo code for part 3.1-3.3 that will ask the user for an username and password which shall match the user.txt file( listed above), user has three times to enter correct login.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started