Skip to content
Snippets Groups Projects
Unverified Commit a4815298 authored by 1-211250088-shajianwei's avatar 1-211250088-shajianwei
Browse files

4.4 iter3_finish

parent 2b7deb48
No related branches found
No related tags found
1 merge request!7Master
File added
......@@ -11,6 +11,7 @@ import java.io.BufferedWriter;
import java.io.FileWriter;
public class CyclomaticComplexityGrader {
private static CyclomaticComplexityCalculator cyclomaticComplexityCalculator;
public static void grade(Exam exam, AnswerSheet answerSheet,String output) {
Question[] questions = exam.getQuestions();
Answer[] answers = answerSheet.getAnswers();
......@@ -18,7 +19,7 @@ public class CyclomaticComplexityGrader {
for (int i = 0;i < answers.length;i++) {
Answer answer = answers[i];
Question question = questions[answer.getId() - 1];
CyclomaticComplexityCalculator cyclomaticComplexityCalculator;
if (question.getType() == 3) {
if (answer.getAnswer().endsWith("java")) {
cyclomaticComplexityCalculator = new JavaCyclomaticComplexityCalculator();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment