Question: Need help [20 points] Write a Java program named SSNCheck that prompts the user to enter a Social Security Number in the format DDD-DD-DDDD where

Need help

Need help [20 points] Write a Java program named SSNCheck that prompts

[20 points] Write a Java program named SSNCheck that prompts the user to enter a Social Security Number in the format DDD-DD-DDDD where D is a digit. Your program should check whether the input is valid. Here are some sample runs: 4. Enter a SSN: 232-23-5435 232-23-5435 is a valid social security number Enter a SSN: 23-23-5435 23-23-5435 is an invalid social security number Here are some tips: Input the SSN as a string Use the Character class methods and char methods to check character positions that should be digits and those that should be a "-" Make sure the overall length is valid

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 Databases Questions!