Question
Methods to check is a character is a valid prefix/domain character Write the following two methods: A method isValidPrefixChar() that takes as input a character
Methods to check is a character is a valid prefix/domain character Write the following two methods: A method isValidPrefixChar() that takes as input a character and returns true if the character can be used in the prefix of a valid email address, false otherwise. Note that a valid prefix can contain only alphanumeric characters, dashes, periods, or underscores. For example, isValidPrefixChar('_') returns true, while isValidPrefixChar('&') returns false. A method isValidDomainChar() that takes as input a character and returns true if the character can be used in the domain (first portion) of a valid email address, false otherwise. Note that a valid first portion of a domain can contain only alphanumeric characters, dashes, or periods. For example, isValidDomainChar('-') returns true, while isValidDomainChar('_') returns false. To get full marks, your method must use the isAlphanumeric() method defined above
Step by Step Solution
3.36 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
Java public boolean isValidPrefixCharchar c return CharacterisAlphanumericc c c c public boolean isV...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