Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a person's name and social security number. The This program l ask the user for program will then check to see if the social security
a person's name and social security number. The This program l ask the user for program will then check to see if the social security number is valid. An exception will be thrown if an invalid SSN is entered You will be creating your own exception class in this program. You will also create a driver program that will use the exception class. Within the diver program, you will include a staticmethod that throws the exception. Note: Since you are creating all the classes for this lab, there are no files on the Student CD associated with this lab Task #1 Writing a Custom Exception Class 1. Create an exception class called SocSecException. The UML diagram for this class is below SocSecException + SocSecExceptioner String) The constructor will call the superclass constructor. It wll set the message associated with the exception to "Invalid social security number" concatenated with the error string 2. Create a driver program called SocSecProcessor. This program will have a main method and a static method called isValid that will check if the social security number is valid SocSecProcessor + main(args String) void + isValidfssn Strn boolean
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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