package cn.com.qmth.examcloud.tool.vo.paper;

/**
 * 题型
 */
public enum QuestionType {

    SINGLE_CHOICE("单选题"),

    MULTIPLE_CHOICE("多选题"),

    FILL_UP("填空题"),

    ESSAY("问答题"),

    TRUE_OR_FALSE("判断题");

    private String desc;

    QuestionType(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    /**
     * 是否为客观题
     */
    public static boolean isObjective(QuestionType type) {
        if (type == null) {
            return false;
        }

        return SINGLE_CHOICE == type || MULTIPLE_CHOICE == type || TRUE_OR_FALSE == type;
    }

}
