View Test Results.
package cs221.groupk.reportandreconciliation; import cs221.groupk.database.*; /** * RREngine is the class that will process information from the database * engine to produce the reporting side of the administration classes. * It will receive arrays of data from the database engine, relating to * either single days, or a range of days. * * <P><I>Code spell-checked - Chris Milner - 5th December 2000.</I><P> * * @author <A HREF="mailto:[email protected]">Gareth Lloyd Jones.</A> */ public class RAndREngine { /** * stationDatabase is an instance of Database Engine which provides * the getBoughtItems methods to access the recorded sales transactions */ DatabaseEngine stationDatabase = new DatabaseEngine(); /** * An instance of ReportData, which will hold the sorted data from the DatabaseEngine. This is the information * that is returned when a report is requested */ ReportData databaseReport = new ReportData(); /** * Default constructor */ public RAndREngine() { } /** * This method will call the validateUser method in the DatabaseEngine * to make sure that the user has the correct access level to * view the reports that could be generated. */ public boolean validateUser(String theName, String thePassword) { return true; } /** * dailyReport will query the database for a single days transactions. * It will use the getBoughtItems(theDay), where theDay is the date * for the day to be reported on, to access the records. * @return The report compiled from the database */ public ReportData dailyReport() { return databaseReport; } /** * seasonReport will query the database about the sales made between two * certain dates. It will use the getBoughtItems(theFirstDay, theSecondDay), * where theFirstDay is the start date, and theSecondDay is the end date * @return The report compiled from the database */ public ReportData seasonReport() { return databaseReport; } /** * completeReport will query the database for every sale ever made. * It will use the getBoughtItems(), with no paramaters, and will be * returned with all the sales made since the system was introduced. * @return The report compiled from the database */ public ReportData completeReport() { return databaseReport; } public static void main(String [] args) { RAndREngine reportingEngine = new RAndREngine(); } }Page automatically generated on: 26/01/01 at: 10:48:20.