package cs221.groupk.ticketing; import cs221.groupk.common.*; /** * This data structure represents an array of stacks. * * <P><I>Code spell-checked - Chris Milner - 5th December 2000.</I><P> * * @author <A HREF = "mailto: [email protected]>Dominique Medland </A> * @version 0.1 Initial Development * @version 0.2 Correction of package name and variable * naming convention errors. */ public class Transaction extends ArrayOfStacks implements StdTransaction, Constants { // /////////////////// // // Instance variables. // // /////////////////// // /** * The total cost of the singles */ protected float grandTotalSingles=0; /** * The total cost of the returns */ protected float grandTotalReturns=0; /** * The total cost of the specials */ protected float grandTotalSpecials=0; // ///////////// // // Constructors. // // ///////////// // /** * Default constructor creates a Transaction of default size. */ public Transaction(){} /** * Secondary constructor creates an Transaction of * specified size. */ public Transaction(int size){} // ////////////////////// // // Read/Write properties. // // ////////////////////// // // ///////////////////// // // Read-only properties. // // ///////////////////// // // //////// // // Methods. // // //////// // /** * Adds the specified BoughtItem to the Transaction at the * specific index. * @param int the index * @param BoughtItem the BoughtItem, which is to be added * @return boolean the state of the adding operation */ public boolean addItem(int index, BoughtItem sale) { return false; } /** * Removes the BoughtItem at the specified index from * the Transaction. * @param int the index of the item to be removed * @return BoughtItem the removed BoughtItem */ public BoughtItem removeItem(int index) { return null; } /** * Returns an int specifying how much the purchased singles * cost. * @return int the grand total of the singles. */ public int getGrandTotalSingles() { return -1; } /** * Sets the grandTotal to the specified value. * @param int the grand total of the singles. */ public void setGrandTotalSingles(int grandTotalSingles) { } /** * Returns an int specifying how much the purchased returns * cost. * @return int the grand total of the returns. */ public int getGrandTotalReturns() { return -1; } /** * Sets the grandTotal to the specified value. * @param int the grand total of the returns. */ public void setGrandTotalReturns(int grandTotalSingles) { } /** * Returns an int specifying how much the purchased singles * cost. * @return int the grand total of the specials. */ public int getGrandTotalSpecials() { return -1; } /** * Sets the grandTotal to the specified value. * @param int the grand total of the specials. */ public void setGrandTotalSpecials(int grandTotalSpecials) { } // ///////////// // // Test methods. // // ///////////// // public static void main( String[] args ) { if( args.length < 1 ) { System.err.println( "Usage: " ); System.exit( -1 ); } try { } catch( Exception e ) { e.printStackTrace( ); } } }Page automatically generated on: 26/01/01 at: 10:48:21.