In
Java
Criteria
1:
Take the following input from the user: [30 points]
a.
First Name
b.
Last Name
C.
Date of Birth (Year/MM/DD)
D.
Address (street name and number, city, state and zip code)
E.
Phone number
F.
Email address
Criteria
2:
[110 points]
You
are required to verify all the inputs from the user. If the user does
not provide input in the right format, the code will ask the
user again to
provide the input.
verification
criteria:-
a)
First Name and Last name should be at least three
characters long.
It will accept only alphabetic characters
as names. If a user fails to provide input satisfying this
criterion, an error message will be shown (for example: Name is not
provided in the correct format. Please enter again.) [20 points]
//
this means you need to write a try-catch block for every input that
you take from a user.
b)
Date of birth: the input should include the year, month and day (all
inputs are numbers ONLY).
Also, you need to check the validity of the provided user input. If
not, provide an error message and asks to enter the valid date. [25
points]
c)
Address: You need to verify the state (two characters only as of the
input like TN, TX and zip code (5 consecutive numbers only). If the
input is not in the correct format, provide an error message and asks
to enter the valid state or zip code. [15 points]
d)
phone number: only numbers in US phone number format (10 digits
without any dashes). Your code should verify the user input. If the
input is not in the correct format, provide an error message and asks
to enter a valid phone number. [20 points]
f)
email address: check the validity of email address (for this project,
please check only .edu email
address). If the input is not in the correct format, provide an error
message and asks to enter a valid email address. [30 points]
Criteria
3:
[40 points]
You
need to do the following formatting of the user input before saving
the information on a file:
a)
The first characters of the first name and last name should be
capitalized. [10 points]
b)
The Date should be saved in the following format: MM-DD-YYYY [10
points]
c)
Phone number should be formatted as +1-(abc)-def-ghij [15 points]
d)
state names should be written fully. For example: TX -> Texas TN
-> Tennessee [5 points]
Criteria
4:
[30 points]
All
the information after changing the formatting will be saved as a text
file.
Filename
convention: yourlastname_currentdate.txt.
[for example: nag_05012020.txt]
The
file location will be inside the project directory.
You
are required to do error handling steps in your code while writing
content to the file. For example:
–
Filename does not exist in that directory.
–
If Filename exists, replace it with current content.
–
contents are written successfully in the file.
Criteria
5:
[20 points]
Your
code should include necessary comments for better readability.
The post verification criteria appeared first on My Assignment Online.