Question
Write a java program that replicates the login/register functionality. The program gives the user two options to choose from 1: Existing User Login, 2: New
Write a java program that replicates the login/register functionality. The program gives the user two options to choose from 1: Existing User Login, 2: New User RegisterIf the user selects option 1, the program asks the user to enter the username. If the username is found in the log file, the program asks for the password. If the username and password match with information in the log file then display a Login Successful message, otherwise display a Username and Password DO NOT match message.If the user selects option 2, the program asks the user to enter the username If the username already exists in the log file,then display a Username already taken message. If it is a new username then the program asks the user to enter the password. The new username and password are added to the log file and the Registration Successful message is displayed. logfile is a text (.txt) file that contains username and password (separated by a space) the combination on each line of the file. Most likely, you will start with an empty file but whenever a new user registers (by selecting option 2), the username and password information is added to the log file as a new line.
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