sk.stuba.fiit.foo07.genex.generator
Class TestGenerator
java.lang.Object
sk.stuba.fiit.foo07.genex.generator.TestGenerator
public class TestGenerator
- extends java.lang.Object
- Author:
- Martin Michalek
This class represents a test generator which selects questions based on the
desired difficulty of generated test.
Constructor Summary |
TestGenerator(java.sql.Connection con,
java.util.ArrayList<java.lang.Integer> questionCategoryIDs,
java.util.ArrayList<java.lang.Integer> keywordIDs,
java.util.ArrayList<java.lang.Integer> questionTypeIDs,
int questionCount,
int pointsSummDesired,
boolean containsPictures,
java.util.ArrayList<java.lang.Integer> difficultiesCount)
|
TestGenerator(java.sql.Connection con,
java.util.ArrayList<java.lang.Integer> questionCategoryIDs,
java.util.ArrayList<java.lang.Integer> keywordIDs,
java.util.ArrayList<java.lang.Integer> questionTypeIDs,
int difficultyDesired,
int questionCount,
int pointsSummDesired,
boolean containsPictures)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestGenerator
public TestGenerator(java.sql.Connection con,
java.util.ArrayList<java.lang.Integer> questionCategoryIDs,
java.util.ArrayList<java.lang.Integer> keywordIDs,
java.util.ArrayList<java.lang.Integer> questionTypeIDs,
int difficultyDesired,
int questionCount,
int pointsSummDesired,
boolean containsPictures)
- Parameters:
con
- database connectionquestionCategoryIDs
- list of category IDs which specify the initial set of
questions for test generatingkeywordIDs
- list of keyword IDs which specify the initial set of
questions for test generatingquestionTypeIDs
- types of questions for the testdifficultyDesired
- test difficulty that we want to achievequestionCount
- number of questions in the testpointsSummDesired
- the point value of the test we want to achievecontainsPictures
- false if the test must not contain questions with pictures
TestGenerator
public TestGenerator(java.sql.Connection con,
java.util.ArrayList<java.lang.Integer> questionCategoryIDs,
java.util.ArrayList<java.lang.Integer> keywordIDs,
java.util.ArrayList<java.lang.Integer> questionTypeIDs,
int questionCount,
int pointsSummDesired,
boolean containsPictures,
java.util.ArrayList<java.lang.Integer> difficultiesCount)
getGeneratedTest
public Test getGeneratedTest()
- Returns:
- the generatedTest
generateTest
public void generateTest()
throws NotEnoughQuestionsException,
java.sql.SQLException
- Generates test based on input parameters. Results are stored in class
fields and can be obtained using getter methods: getGeneratedTest(),
getDifficultyAchieved(), getPointsSummAchieved()
- Throws:
NotEnoughQuestionsException
java.sql.SQLException
assembleTest
public void assembleTest()
throws NotEnoughQuestionsException,
java.sql.SQLException
- Throws:
NotEnoughQuestionsException
java.sql.SQLException
Copyright © 2008 Faculty of Informatics and Information Technologies, STU Bratislava. All Rights Reserved.