org.problets.student
Class StudentModel

java.lang.Object
  extended by java.util.Observable
      extended by org.problets.student.StudentModel
All Implemented Interfaces:
GradeConstants

public class StudentModel
extends java.util.Observable
implements GradeConstants

StudentModel class to record all student-related information

Author:
Amruth Kumar

Field Summary
static java.lang.String HEADER
           
 
Fields inherited from interface org.problets.tutor.GradeConstants
CORRECT, GENERATED, gradeText, INCORRECT, MISSED, PARTIAL, TOTAL_STATS, UNATTEMPTED
 
Constructor Summary
StudentModel(KnowledgeModel correctKM)
          -----------------------------------------------------
 
Method Summary
 void addtoAnswer(CodeSegmentAttempt step)
          Adds a code segment answer for coding problems
 void addtoAnswer(ErrorLine inErrorLine)
          This subsumes ErrorLine and LineOutput versions below public void addtoAnswer( AbstractLine line ) { currentAnswer.addtoAnswer( line ); }
 void addtoAnswer(ExpressionViewStep step)
          Adds to the answer for an expression evaluation problem
 void addtoAnswer(LineOutput inOutput)
          Adds to the answer for an output problem - Needed to enter "No Output"
 void addtoAnswer(LineOutput inOutput, java.util.Vector actualOutput, java.lang.Object source)
          Adds to the answer for an output problem
 void addtoAnswer(java.util.Vector dataTrace)
          Adds to the answer for a state problem
 void addToGrades(StudentRecord newGrade)
          Adds grade for another problem
 int[] getAbbreviatedPerformance()
          Returns the ABBREVIATED performance for ALL the learning objectives
 java.util.Vector getAllLearningObjectives()
          Returns all the learning objectives for this topic, not just those where the student needs to solve more problems
 java.util.Vector getAnswers()
           
 java.util.Vector getAnswersForLine(int lineNumber)
           
 java.util.Vector getDetailedPerformance()
          Returns the detailed performance for ALL the learning objectives
 java.lang.String getGradesAbbreviated(boolean singleLine)
          Returns the number of problems the student generated, attempted, solved correctly, partially and incorrectly
 java.lang.String getGradesDetailed()
          Returns the student's grade individually for each problem.
 java.lang.Object getLastAnswer()
           
 StudentRecord getLastGrade()
          Helps CodeFeedbackManager add time spent on problem
 int getNumberEntries()
           
 java.lang.String getProgress()
          Returns only the number of problems generated and attempted
 IndividualKnowledgeModel getStudentKM()
          Returns an immutable reference to the student's knowlege model - used by conceptmap.OpenStudentModeler
 java.util.Vector getStudentKUs()
          Returns a clone of the vector of references to the actual knowledge units in the student model
 java.util.Vector getStudentLearningObjectives()
          Returns the vector of pointers to knowledge units for this session for the student
 boolean isLastAnswerCorrect()
          Returns whether the last problem was solved correctly
 boolean isProblemAttempted()
          ----------------------------------------------------- Method to return whether the problem has been attempted
static void main(java.lang.String[] args)
           
 void printStudentKnowledgeModel()
           
 void reset()
          ----------------------------------------------------- Method to reset all simulation flags for current instance of the problem.
 void resetGrades()
          Resets the grades for the student
 void undoAllAnswers()
           
 void undoLastAnswer()
          Removes the last entry in the answer
 void updateAnswersForLine(int lineNumber, java.util.Vector newAnswers, java.util.Vector actualAnswer)
          Updates the answer for a line for an output problem
 void updateCredit(java.lang.String problemTypeString, int gradeType)
          Method to work with the new grade() method - It will let TutorModel.grade() register correct/incorrect/missed for the right type of problem.
 void updateLearningObjectives()
          Goes through all the learning objectives to see if they have been met
 void verifyOutputCorrectness(java.util.Vector actualAnswer)
          If the user manipulates the output of a program on the OutputStreamView panel this method is used to verify the correctness of the changes for Error-Flagging purposes
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER

public static final java.lang.String HEADER
See Also:
Constant Field Values
Constructor Detail

StudentModel

public StudentModel(KnowledgeModel correctKM)
-----------------------------------------------------

Parameters:
-
Method Detail

reset

public void reset()
----------------------------------------------------- Method to reset all simulation flags for current instance of the problem.

Parameters:
none -

getStudentLearningObjectives

public java.util.Vector getStudentLearningObjectives()
Returns the vector of pointers to knowledge units for this session for the student


getAllLearningObjectives

public java.util.Vector getAllLearningObjectives()
Returns all the learning objectives for this topic, not just those where the student needs to solve more problems


getStudentKUs

public java.util.Vector getStudentKUs()
Returns a clone of the vector of references to the actual knowledge units in the student model


getStudentKM

public final IndividualKnowledgeModel getStudentKM()
Returns an immutable reference to the student's knowlege model - used by conceptmap.OpenStudentModeler


getAnswersForLine

public java.util.Vector getAnswersForLine(int lineNumber)

getLastAnswer

public java.lang.Object getLastAnswer()

getAnswers

public java.util.Vector getAnswers()

getNumberEntries

public int getNumberEntries()

isProblemAttempted

public boolean isProblemAttempted()
----------------------------------------------------- Method to return whether the problem has been attempted

Parameters:
none -
Returns:
true if problem has been attempted, false otherwise -------------------------------------------------------

getDetailedPerformance

public java.util.Vector getDetailedPerformance()
Returns the detailed performance for ALL the learning objectives


getAbbreviatedPerformance

public int[] getAbbreviatedPerformance()
Returns the ABBREVIATED performance for ALL the learning objectives


getProgress

public java.lang.String getProgress()
Returns only the number of problems generated and attempted


isLastAnswerCorrect

public boolean isLastAnswerCorrect()
Returns whether the last problem was solved correctly


getGradesAbbreviated

public java.lang.String getGradesAbbreviated(boolean singleLine)
Returns the number of problems the student generated, attempted, solved correctly, partially and incorrectly


getGradesDetailed

public java.lang.String getGradesDetailed()
Returns the student's grade individually for each problem.


getLastGrade

public StudentRecord getLastGrade()
Helps CodeFeedbackManager add time spent on problem


addtoAnswer

public void addtoAnswer(ErrorLine inErrorLine)
This subsumes ErrorLine and LineOutput versions below public void addtoAnswer( AbstractLine line ) { currentAnswer.addtoAnswer( line ); }


addtoAnswer

public void addtoAnswer(LineOutput inOutput)
Adds to the answer for an output problem - Needed to enter "No Output"


addtoAnswer

public void addtoAnswer(LineOutput inOutput,
                        java.util.Vector actualOutput,
                        java.lang.Object source)
Adds to the answer for an output problem


addtoAnswer

public void addtoAnswer(java.util.Vector dataTrace)
Adds to the answer for a state problem


addtoAnswer

public void addtoAnswer(ExpressionViewStep step)
Adds to the answer for an expression evaluation problem


addtoAnswer

public void addtoAnswer(CodeSegmentAttempt step)
Adds a code segment answer for coding problems


undoLastAnswer

public void undoLastAnswer()
Removes the last entry in the answer


undoAllAnswers

public void undoAllAnswers()

updateAnswersForLine

public void updateAnswersForLine(int lineNumber,
                                 java.util.Vector newAnswers,
                                 java.util.Vector actualAnswer)
Updates the answer for a line for an output problem


verifyOutputCorrectness

public void verifyOutputCorrectness(java.util.Vector actualAnswer)
If the user manipulates the output of a program on the OutputStreamView panel this method is used to verify the correctness of the changes for Error-Flagging purposes


updateCredit

public void updateCredit(java.lang.String problemTypeString,
                         int gradeType)
Method to work with the new grade() method - It will let TutorModel.grade() register correct/incorrect/missed for the right type of problem. Note that it will register for not just the current problemType, but also for any others that may come up in the problem. E.g., if the current problem type is syntax error (line 6) and dangling pointer (line 9), and the user answers syntax error (line 12) and dangling pointer (line 9) and lost object (line 15) then TutorModel will register as follows: dangling pointer - correct syntax error - incorrect (for 12) and missed (for line 6) lost object - incorrect (for line 15)


updateLearningObjectives

public void updateLearningObjectives()
Goes through all the learning objectives to see if they have been met


addToGrades

public void addToGrades(StudentRecord newGrade)
Adds grade for another problem


resetGrades

public void resetGrades()
Resets the grades for the student


printStudentKnowledgeModel

public void printStudentKnowledgeModel()

main

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