ukacgla_ATT
Class Checker

java.lang.Object
  |
  +--ukacgla_ATT.Checker
Direct Known Subclasses:
Ex01_Checker

public abstract class Checker
extends java.lang.Object


Field Summary
protected  boolean correct
          True if all student input correct, otherwise false
protected  TTRandom random
          Contains the random numbers corresponding to the type of logic gate
protected  TableUI table
          Allows access to the GUI and student input variables
protected  java.util.Vector wrongLines
          Holds the number of lines containing errors
 
Constructor Summary
Checker(TableUI t, TTRandom r)
           
 
Method Summary
protected  boolean allCorrect()
          Returns boolean true if no errors found.
protected abstract  void calcAnswer(int row)
          Implementations of calcAnswer(int row) must provide the correct answer for a single row.
protected abstract  void checkAnswer(int row)
          Implementation of checkAnswer(int row) must check if the student input for a single line is correct.
protected  void clearVector()
          clears contents of vector prior to next checking run.
protected abstract  void revealAnswer(int row)
          Implementations of revealAnswer(int row) will display the correct answer for a single row.
protected  java.lang.String wrongLines()
          Vector wrongLines contains the rows with errors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

correct

protected boolean correct
True if all student input correct, otherwise false

random

protected TTRandom random
Contains the random numbers corresponding to the type of logic gate

table

protected TableUI table
Allows access to the GUI and student input variables

wrongLines

protected java.util.Vector wrongLines
Holds the number of lines containing errors
Constructor Detail

Checker

public Checker(TableUI t,
               TTRandom r)
Method Detail

allCorrect

protected boolean allCorrect()
Returns boolean true if no errors found.

calcAnswer

protected abstract void calcAnswer(int row)
Implementations of calcAnswer(int row) must provide the correct answer for a single row.

checkAnswer

protected abstract void checkAnswer(int row)
Implementation of checkAnswer(int row) must check if the student input for a single line is correct.

clearVector

protected void clearVector()
clears contents of vector prior to next checking run.

revealAnswer

protected abstract void revealAnswer(int row)
Implementations of revealAnswer(int row) will display the correct answer for a single row.

wrongLines

protected java.lang.String wrongLines()
Vector wrongLines contains the rows with errors. Method returns the vector as a string to allow table to construct the appropriate error message