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

1. (30 points) Implement a Java application that gets several number of

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!