Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (30 points) Implement a Java application that gets several number of Social Security numbers (SSN) from the user. The number of SSNs to

image

1. (30 points) Implement a Java application that gets several number of Social Security numbers (SSN) from the user. The number of SSNs to be gathered is specified by using command line argument. Application checks whether the entered SSNs are valid or invalid. An SSN is said to be valid, if it has the format below. a. Use Split method b. Use Regular Expression XXX-XX-XXXX to validate the SSNs. For each option, write a separate application. If the entered SSN is valid, then display it as in the format "xxx xx xxxx", otherwise display an appropriate warning message as in the example run. a. Example Run #1: Enter an SSN: 123-456-789 123 Middle part must contain 2 characters! Example Run#2: Enter an SSN: 1239-12-4567 Initial part must contain 3 characters Example Run #3: Enter an SSN: 867-54-6874 867 54 6874 Enter an SSN: 456-47-654 456 47 Last part must contain 4 characters! Example Run#4: Enter an SSN: 123-45-6789 123 45 6789 Enter an SSN: 345-67-8910 345 67 8910 Enter an SSN: 456-78-9101 456 78 9101

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

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

How did the APB pave the way for the FASB?

Answered: 1 week ago

Question

Given the following data: The residual income would be

Answered: 1 week ago