Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Digits &texts Masking in java programing write a java programming to mask email address and phone number Email address masking: Only show the first and

image text in transcribed
Digits &texts Masking in java programing write a java programming to mask email address and phone number Email address masking: Only show the first and last characters of the username tomponent of an email address, along with the email domain name. include exactly 5 stars in the middle of the email username to mask the length. The username part of the email address may use any of the ASCII characters list below. Uppercase and lowercase English letters (a-z, A-z) Digits 0 to 9. Characters ! #S%A'*+-/-1-1)" Character (dot, period, full stop) provide that is not the first or last character, and provided also that it does not appear two or more times consecutively * . Example: JonesAndMurphy@gmail.com i "v@gmail.com Phone number Masking: Mask all the digits is a phone number except the last 4 digits. Each number should be replaced by star). Input phone numbers can be with or without country code. Input phone numbers can only have' (") or in them along with numbers and spaces. Make sure+is not masked in the output and make sure the number of stars is equal to the number of digits while masking. Phone numbers will always have 10 digits without country code and with country code they could be up 13 digits. Example! : +1(333)444-5678 +*- - -5678 Example! : +91 (333)444-5678 +**- . -5678 Example 1: +1 1 1 (333444-5678 + - - -5678 Example2: 333 444 5678 - .5678 Example3: (333)444-5678 - -5678 Program input and output: Program input will have multiple entries. Each entry will start with "E". for email and P" for phone number. Ignore spaces if they are found in input. Below are the examples: Input: . E: JonesAndMurrphy@CNN.com P: +13334445678 Output Ey@CNN.com P:+5678 import java.io.* import java.util. import java.text import java math. Public class mask ( Public Static void main (String args[D throws Exception f //write the code here ll if it is possible please add comments & explanations please

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago