for(int i=0; i<medicalrecords.length; i++) { var strategy = new reestablishhealthplan(); var document = medicalrecords[i].getdocument(); if(document.isencrypted()) { var explanation = preexplanatorynote.addtodocument(); document.evademisinterpretationwith(explanation); encryptandsavedocument(document); } }