* calling method to know how to deserialize and check for errors.
*/
public byte[] getResults( byte[] in, int flag ){
//Create the factories used to process the input and generate
//appropriate concrete classes needed to execute calculations.
TableDataFactory tdFactory = new TableDataFactory();
CalcEngineFactory calcFactory = new CalcEngineFactory();
//Create the objects used to store the results...
//This is the class the holds all results (or errors) for serialization
CalculateResults results = new CalculateResults();
//Holds the results for each individual player if there are no errors
PlayerResults[] playerResults;
//The table data factory is responsible for deserializing the input
//array and returning the appropriate concrete Table Data implementation
TableDataIntf td = tdFactory.createTableData( in, flag );
//The calc engine factory uses the table data instance to determine the
//appropriate calc engine implementation to use
calcEngine = calcFactory.createCalcEngine( td );