package untitled3; // In main import javax.swing.*; public class main { public static void main(String[] args) { // Create Employee array employee[] a=new employee[100]; int i=0, count=0; System.out.println("How many employees would you like to input?"); i=SavitchIn.readLineInt(); while(i>count) { try{ System.out.println("Enter employee's age: (" +count+ ") "); int age=SavitchIn.readLineInt(); System.out.println("Enter employee's name: (" +count+ ") "); String name=SavitchIn.readLine(); System.out.println("Enter employee's salary: (" +count+ ") "); double salary=SavitchIn.readLineDouble(); System.out.println("Enter employee's SSN: (" +count+ ") "); String SSN=SavitchIn.readLine(); if(SSN.length()!=9) throw new SSNLengthException(SSN); for(int z=1;z'9') throw new SSNCharacterException(SSN); } a[count]=new employee(age, name, salary, SSN); count++; } catch(SSNLengthException e) { System.out.println("Length Error chief"); } catch(SSNCharacterException e) { System.out.println("Character Error chief"); } catch(Exception e) { } } }//end of main }//end of ExceptionApp