help with creating username/password and random numbers

hi i need help with the below I have searched the internet on how to create a username/password but all the code i find see,s to create frames and buttons can I just use JPasswordField so that there would be less code ? also I am able to create a random number but how can i get the 50 numbers to appear in one dialog box instead of each one coming up seperately. Below is the brief i have to do thanks!

I have been asked to develop a piece of software to create 50 new membership numbers.
The piece of software also will take a username and password from the manager and once these are
created it will allow the manager create the randomly generated membership numbers. It will then allow
the user to enter a membership number. If this matches one of the randomly generated numbers access
will be granted.

1. Output a message to the output screen asking the user to input their username, then


2. Check that the username and password match the following

3. If the user name and password are correct then generate a new array with 50 randomly

generated membership numbers, each with 4 digits.

4. When the array has being created get the user to enter their four digit membership number

to access the site.

5. Search the list of membership numbers to see if the number is in the array.

6. Do a linear Search do find a match

7. If the membership number matches the print message saying access granted

8. Otherwise print access denied.

a. Username =
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!