Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

  1. 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]

  1. 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.
    1. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago