Hi??
i have a problem in java...and i'm not quite sure how to solve it, and was wandering if anyone would be able to help me out here...
i have started something but not sure what to do next.
Here is the problem:
Problem 1
A program accepts identification number, first name, last name, and email address of a user. It validates the data as per following specifications:
.identification number – no blanks, four numerical characters;
.first name – no blanks, all alphabetical characters;
.last name – same as for first name;
.email address–
.no blanks;
.only one ‘@’character;
,there is at least one
word before ‘@’, and at least two words after ‘@’, both words(following ‘@’ joined by ‘.’, no space between the words before and after the ‘.’ character.
Assume that there are maximum of two words following ‘@’character, and there are maximum of 25 characters in the email address.
If any of the data item is invalid, program displays an appropriate message to the user and asks for re-entry of that item.
When all data items entered are valid, program creates a password for the user by joining:
.first two characters of first name;
.2nd and 3rd characters of identification
.last three characters from the last name;
in above order.
Password is then relayed back to user. Later then enters this password and program then checks that user has entered the correct password (as created for him/her), and displays the message to the user accordingly.
You do not need to create any special user interface but must utilize
string and array processing functions
and here is my source code so far.. if any one helpful enough could fix the program for me that would be much appreciated..thanks
kind regards,
Atif.
/******begining of code ****************|
/*****************end of code*******************/
[I've edited your post, surrounding the code with the proper
ubb tags in order to preserve formatting and make the code easier to understand. -Dirk]
[ May 21, 2002: Message edited by: Dirk Schreckmann ]