Class Processor

java.lang.Object
  |
  +--Processor

public class Processor
extends java.lang.Object

The Processor takes the transcript of the student and the choices he/she made after loging into the SAS. All requirements from the database are read, parsed and then the student record is evaluated agains those requirements. A list of all requirements that are not met is generated.


Constructor Summary
Processor(java.util.Map vars)
          Initializes a newly created Processor with an object of type Map as input.
 
Method Summary
 int calculate(int req_credits, java.lang.String to_be_parsed)
          Evaluates a single Expression.
 void check_coreq(java.lang.String to_check)
          Checks if the course has any corequisites.
 void check_prereq(java.lang.String to_check)
          Checks if the course has any prerequisites.
 void computeCollege_wide()
          Evaluates College-wide requirements.
 void computeCore()
          Evaluates Core requirements.
 void computeGeneral()
          Evaluates General requirements.
 void computeMajor()
          Evaluates requirements for Major.
 void computeMinor()
          Evaluates requirements for Minor.
 void computeSecondMajor()
          Evaluates requirements for Second Major.
 void computeTransfer()
          Evaluates Core requirements for transfer students.
 ResultTerm eval_and_term(java.lang.String input)
          Evaluates a term delimited with the * operator
 ResultTerm eval_or_term(java.lang.String input)
          Evaluates a term delimited with the | operator
 java.util.ArrayList go()
          Top-most level function.
 boolean is_it_allowed(java.lang.String course)
          Checks if a course is allowed to be considered for this requirement.
 void is_it_LiberalArt()
          Checks all courses from transcript and acumulates all liberal arts credits into p_total_liberal_art.
 int is_it_taken(java.lang.String course)
          Checks if a course has already been taken.
 void output(java.util.ArrayList p_courses_to_out, int credits_left)
          Takes a list of courses to be taken and formats them according to output specifications.
 int parseExpression(java.lang.String input, java.util.ArrayList list_of_str)
          Parses the Expression into basic terms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Processor

public Processor(java.util.Map vars)
Initializes a newly created Processor with an object of type Map as input. The constructor also initializes the internal fields it needs and allocates memory for the ArrayList fields.

Method Detail

go

public java.util.ArrayList go()
Top-most level function. Performs all necessary computations and gives the final result.


parseExpression

public int parseExpression(java.lang.String input,
                           java.util.ArrayList list_of_str)
Parses the Expression into basic terms. The result is a list of terms that is put in the ArrayList provided as input.


eval_or_term

public ResultTerm eval_or_term(java.lang.String input)
Evaluates a term delimited with the | operator


eval_and_term

public ResultTerm eval_and_term(java.lang.String input)
Evaluates a term delimited with the * operator


is_it_allowed

public boolean is_it_allowed(java.lang.String course)
Checks if a course is allowed to be considered for this requirement.


is_it_taken

public int is_it_taken(java.lang.String course)
Checks if a course has already been taken. If not taken returns -1 if taken returns number of credits for this cou rse.


is_it_LiberalArt

public void is_it_LiberalArt()
Checks all courses from transcript and acumulates all liberal arts credits into p_total_liberal_art.


output

public void output(java.util.ArrayList p_courses_to_out,
                   int credits_left)
Takes a list of courses to be taken and formats them according to output specifications.


check_coreq

public void check_coreq(java.lang.String to_check)
Checks if the course has any corequisites.


check_prereq

public void check_prereq(java.lang.String to_check)
Checks if the course has any prerequisites.


computeMajor

public void computeMajor()
Evaluates requirements for Major.


computeSecondMajor

public void computeSecondMajor()
Evaluates requirements for Second Major.


computeMinor

public void computeMinor()
Evaluates requirements for Minor.


computeCore

public void computeCore()
Evaluates Core requirements.


computeTransfer

public void computeTransfer()
Evaluates Core requirements for transfer students.


computeCollege_wide

public void computeCollege_wide()
Evaluates College-wide requirements.


computeGeneral

public void computeGeneral()
Evaluates General requirements.


calculate

public int calculate(int req_credits,
                     java.lang.String to_be_parsed)
Evaluates a single Expression.