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

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 Databases Questions!