Question
Please provide comments for the following java code problem Youve just been hired onto the IT staff at the Best University Ever (BUE). Youre currently
Please provide comments for the following java code problem
Youve just been hired onto the IT staff at the Best University Ever (BUE). Youre currently working on a website that collects student information, and you want to make sure that the email addresses they provide are valid university emails. BUEs emails are case-insensitive and in this format:
[first initial].[last name][1 or more digits (optional)]@
[1 or more subdomains, each followed by a dot (optional)]bue.edu
The first initial, last name, and subdomains (if present) cannot be blank, and they can contain only letters.
Within a source file named EmailValidator.java, write the static method boolean isValidEmail(String s). This method returns whether s is a valid email address. Here are some examples of valid email addresses:
t.stark@bue.edu
T.stArK420@cs.bue.edu
O.Prime@rigel.CS.bue.edu
s.snape@darkarts.bue.edu
Here are some examples of invalid email addresses:
soccerlover@bue.edu
Missing first initial
k.k.line@bue.edu
Too many first initials
jon.snow@bue.edu
First initial is too many characters
j.snow@van.edu
Wrong university
j.snow@bue.com
No .edu domain BUE is totally not commercial, or so they claim
j.snow2stark@bue.edu
Digits must be after the last name
r.summers@cs2.bue.edu
Subdomain contains a non-letter character
r.summers@.bue.edu
Blank subdomain
x.xXx_Sephiroth_xXx@bue.edu
Last name contains non-letter characters
blargh
What kind of excuse for an email address is this??
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started