Assignment 12 Type solution and submit as an attachment. I. Create the clar Char
ID: 3777807 • Letter: A
Question
Assignment 12 Type solution and submit as an attachment. I. Create the clar CharacterReader that has the following propertiene protected string field D publie default erestructor that assigas the elepty string to data. public get acorwoor methods for deta public virtual void method named Addo that take one char parameter. It add the parameter to the end of deta 2. Create the class UniqueCharacterReader that has the following properties: publicly inherits CharacterReader. public default contractor that the empty string to data. public ouermilden Addo that only add the parameter to the end of data if the character is not already in data 3 Create the clase SortedCharacterReader that has the following properties publicly inherits CharacterReader. public default constructor that areig the empty string to data. publir overridden Addo that add the parameter to dara and sort dote in asrending order. la the rain, create a pointer array of CharacterReader that coutains aa for each clas (it has three elements in all. Next, use a loop to randomly add Ivandred (00) characters each of the elements of the array. Add the characters display data each element.Explanation / Answer
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
public category uniquechar mathematician result=false;
String inputstring="Alve i@wsom";
System.out.println(inputstring);
HashSet < Character> uniquecharset= new HashSet();
for(int i=0;i < inputstring.length();i++)
System.out.println(result); }
}
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
public category UniqueChar2 mathematician result=false;
String inputstring="Alive is awesome";
System.out.println("String technique two answer "+ method2(inputstring));
}
public static mathematician method2(String input)
if(count > 1)
come false;
}
come true;
}
}