Question: Can someone fix the code by reading comments (in red color) . Thank you. Users Al /AL Ahaed LAB S Due OCT 16,2918 /This progran

Can someone fix the code by reading comments (in red color) . Thank you.  Can someone fix the code by reading comments (in red color)
. Thank you. Users Al /AL Ahaed LAB S Due OCT 16,2918

Users Al /AL Ahaed LAB S Due OCT 16,2918 /This progran check whether the input is valid and in the correct format ort java.util.Scr; ublic class SocialSechus ublic static woid maintString argsII) Scanner console new Scanner(System. In) ooLean ssnFlag false: hile (issnFlag) ystea out.printl Enter SS: tring sunstr consote.nextLinet) snFlag verifyssNissnStr)a oolean strFlag false: / Loop to re Stri and Str2 untit Stri is one Char length hile (istrflag) rstes.out.print ("Enter String 1: tring strl conso le.nextline) yste.out.print("Enter String 2: tring str2 conso le.nextlinet) f(stri. Lengtht) 1)4 trFlagtrue else if(stri.length) str2. length)) fiverifySubString(strl, str2)) DO NOTHING t vord public static boolean verifysubString(String strl, String str2) iffstri.contains(str2HC I/ Check for sstr1 contains str2 ystes out.print tn("String str2 is a substring in stri return true: and starts ar position +strl.indexOf (str2)): ystem out.print In("String+str2is not a substring of str1): return falses public static boblean verifySSNIString ssn) f (ssn, length,!. 11 ) // Check for length false f (ssm eharkti)ssn.charatti)'9') Check for digits cont inue; Ise ( ystes. out.println("Input not valid at return fatse: Layd + (i + 1)); else if (i1) if ((ssn.charkt (i). "I' a6 ssn.charAt(i) Y' ) A66 ssn.charkt(i) (ssn.charkt (i) 11 2')) /Check for digit or Alpha ontinue; Lse f ystem.out.print In("Input not valid at+i return false: 1)

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!