Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java: Write the following program. You've just been hired onto the IT staff at the Best University Ever. You're working on a website that

In Java: Write the following program.

image text in transcribed

You've just been hired onto the IT staff at the Best University Ever. You're working on a website that collects student information, and you want to make sure that the email addresses they provide are valid university emails. BUE's 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. Write a method that returns whether an email address is valid. Required method header: public static boolean isValidEmail (String s) Examples of valid BUE addresses t. stark@bue.edu T.stArK420@cs.bue.edu o. Prime@rigel.Cs.bue.edu s. snape@darkarts.bue.edu Example of invalid BUE addresses: slothlover@bue.edu (missing first initial) j middot j middot .abrams@bue. edu (too many "first initials") jon. snow@bue.edu (first "initial" is too many characters) j middot snow@memphis.edu (wrong university) j middot snow@bue.com (no edu domain - BUE is totally not commercial, or so they claim) j middot 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 middot 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions