Question: Write a Java program for the registration screen. You'll have user Name, Password, and Retype Password as the three required fields. You'ill provide user name,
Write a Java program for the registration screen.
You'll have user Name, Password, and Retype Password as the three required fields.

You'ill provide user name, password, and retype password in the three textfields following that, with a Button Register that you click after you enter the data.
You will create a username txt consisting of 5 existing users: "Alan", Bob", "Charlie", "David", and "Ed" for boys or "Alice", Betty", "Carol", "Diane", and " Elaine" for girls. (if you do not know how to open file using Java, you can use array to save user name info).
A user name you typed in during registration can not be the same as any of the 5 names in username txt. Also the user name has to be between 5 and 8 characters without any numbers (i.e., the user name can be only 'A' to 'Z' or 'a' to 'z' but not any digits like 0, 1 through 9).
A password is also between 5 and 8 characters, with numbers allowed (so 12345 and abcde are both valid passwords). The retyped password must be the same as password otherwise, an error message output after hitting the Register button.
When user name passes 5 to 8 characters validity check, user name does note exist in username txt, and password passes the validity check, the new user name is added to username txt.
Test your program with a couple of valid cases, a couple of invalid cases (bad user names or bad passwords etc.)
User Name Password Retype Password Register
Step by Step Solution
3.53 Rating (150 Votes )
There are 3 Steps involved in it
To create the registration screen as described you can use Java Swing for the GUI components Heres a simple implementation java import javaxswing import javaawtevent import javautilArrayList import ja... View full answer
Get step-by-step solutions from verified subject matter experts
