org.problets.domain.model.control.iteration
Class VBForLoopModel

java.lang.Object
  extended by org.problets.domain.model.DomainModel
      extended by org.problets.domain.model.control.ControlModel
          extended by org.problets.domain.model.control.ConditionControl
              extended by org.problets.domain.model.control.iteration.AbstractLoopModel
                  extended by org.problets.domain.model.control.iteration.ForLoopModel
                      extended by org.problets.domain.model.control.iteration.VBForLoopModel
All Implemented Interfaces:
java.lang.Cloneable

public class VBForLoopModel
extends ForLoopModel

Model of a Visual Basic For loop

Author:
Amruth Kumar

Field Summary
 
Fields inherited from class org.problets.domain.model.control.iteration.ForLoopModel
IDENTITY
 
Fields inherited from class org.problets.domain.model.control.iteration.AbstractLoopModel
ASSIGNMENT_IN_CONDITION, CONST_CONDITION, DECLARATION_IN_CONDITION, INCORRECT_UPDATE, NO_UPDATE, NULL_CONDITION, TERMINAL_MODIFIED
 
Fields inherited from class org.problets.domain.model.control.ConditionControl
INCORRECT_TYPE
 
Fields inherited from class org.problets.domain.model.control.ControlModel
ABORT_EXECUTION, BREAK_EXECUTION, CONTINUE_EXECUTION, END_EXECUTION, INFINITE_EXECUTION, RETURN_EXECUTION, RUN_TIME_ERROR_EXECUTION, SKIP_EXECUTION
 
Fields inherited from class org.problets.domain.model.DomainModel
BOOLEAN, BREAKPOINT, CHARACTER, DOUBLE_PRECISION_REAL, ERROR_TYPE, EVAL_STATUS, expACTION, expASSIGNMENT, expAUTO_DEALLOCATION, expCALL, expCONDITION, expDECLARATION, expDEREFERENCING, expDYNAMIC_ALLOCATION, expDYNAMIC_ALLOCATION_INITIALIZATION, expDYNAMIC_DEALLOCATION, expELSE_CLAUSE, expERROR, expEXECUTION, expIF_CLAUSE, expINITIALIZATION, expINPUT, expPARAMETER_PASSING, expPRINT, expQUESTIONABLE, expREFERENCING, expRETURN, expRUNTIME_ERROR, expSEMANTIC_ERROR, expSYNTAX_ERROR, expUPDATE, MAX_OBJECT_IDENTITY, MIN_OBJECT_IDENTITY, QUADRUPLE_PRECISION_REAL, RUNTIME_ERROR, SEMANTIC_ERROR, SIGNED_INTEGER, SIGNED_LONG, SIGNED_SHORT, SINGLE_PRECISION_REAL, SYNTAX_ERROR, UNDEFINED_TYPE, UNSIGNED_INTEGER, UNSIGNED_LONG, UNSIGNED_SHORT, WARNING
 
Constructor Summary
VBForLoopModel(ActivationRecord parent, HeapModel heap, java.lang.String inTemplate, int inScopeType)
           
 
Method Summary
 void getCode(java.util.Vector codeText, OutputStream output)
          public void getCode(Vector codeText, OutputStream output) This function generates the code seen by the student
static void main(java.lang.String[] args)
           
 void parseHeader(java.lang.String header)
          Parses the header string and extracts initial, condition and update strings.
 
Methods inherited from class org.problets.domain.model.control.iteration.ForLoopModel
explainInitial, explainProcess, explainUpdate, getName, grade
 
Methods inherited from class org.problets.domain.model.control.iteration.AbstractLoopModel
getLoopValues, getPossibleErrors
 
Methods inherited from class org.problets.domain.model.control.ControlModel
getCodeLength, getStartLineNumber
 
Methods inherited from class org.problets.domain.model.DomainModel
clone, getId, getIdName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VBForLoopModel

public VBForLoopModel(ActivationRecord parent,
                      HeapModel heap,
                      java.lang.String inTemplate,
                      int inScopeType)
Method Detail

parseHeader

public void parseHeader(java.lang.String header)
Parses the header string and extracts initial, condition and update strings. This is called by the constructor.

Overrides:
parseHeader in class ForLoopModel
Parameters:
header - - a String that holds the header

getCode

public void getCode(java.util.Vector codeText,
                    OutputStream output)
public void getCode(Vector codeText, OutputStream output) This function generates the code seen by the student

Overrides:
getCode in class ForLoopModel
Parameters:
codeText - - a vector that holds the code

main

public static void main(java.lang.String[] args)