diff options
author | Camil Staps | 2015-04-18 13:44:44 +0200 |
---|---|---|
committer | Camil Staps | 2015-04-18 13:44:44 +0200 |
commit | 6a44b074f0169a1b0f9e92347af929c5e471746e (patch) | |
tree | ae5663fe7c69881bf4ecfedbef99c2505f8ec964 /Week5/src/week5/Question.java | |
parent | Added copyright to docs (diff) |
Reorganised projects
Diffstat (limited to 'Week5/src/week5/Question.java')
-rw-r--r-- | Week5/src/week5/Question.java | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/Week5/src/week5/Question.java b/Week5/src/week5/Question.java deleted file mode 100644 index 3b05414..0000000 --- a/Week5/src/week5/Question.java +++ /dev/null @@ -1,56 +0,0 @@ -package week5; - -/** - * Abstract class for quiz questions - * - * @author Camil Staps, s4498062 - */ -public abstract class Question { - - protected String question = ""; - protected int weight = 3; - - @Override - public String toString() { - return question + " (pt: " + weight + ")"; - } - - /** - * Checks if a given answer is correct - * - * @param answer the answer to check - * @return true iff the answer is correct - */ - public abstract boolean isCorrect(String answer); - - /** - * Returns the correct answer - * - * @return the correct answer - */ - public abstract String juisteAntwoord(); - - /** - * Set the weight of this question (succeeds only if 0 < weight < 6) - * - * @param weight the new weight - */ - protected void setWeight(int weight) { - if (weight > 0 && weight < 6) { - this.weight = weight; - } - } - - public int getWeight() { - return weight; - } - - /** - * Create a new instance with the same parameters - * - * @return the new question - */ - public Question duplicate() { - return this; - } -} |