private ResponseDeclaration createResponseDeclaration() {
   // create and include responseDeclaration
   ResponseDeclaration aResponseDeclaration = new ResponseDeclaration(fAssessmentItem, "RESPONSE");
   aResponseDeclaration.setBaseType(AssessmentElementFactory.DIRECTED_PAIR);
   aResponseDeclaration.setCardinality(AssessmentElementFactory.MULTIPLE);
   setResponseDeclaration(aResponseDeclaration);
   fAssessmentItem.getResponseDeclarationList().addElement(aResponseDeclaration);
   return aResponseDeclaration;
 }
 /** Creates a new instance of GapMatchInteraction */
 public GapMatchInteraction(AssessmentItem anAssessmentItem, int choiceNumber) { // used by UI
   setAssessmentItem(anAssessmentItem);
   fShuffle = true; // default
   for (int i = 0; i < choiceNumber; i++) {
     fGapTextList.addElement(new GapText(anAssessmentItem, this));
   }
   ResponseDeclaration aResponseDeclaration = createResponseDeclaration();
   aResponseDeclaration.setAssociatedOutcomeDeclaration(
       createOutcomeForMatchCorrect(aResponseDeclaration));
 }