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 TicketingEngine
implements StdTicketingEngine, Constants {
/**
* The station's Disk containing transferable data
*/
protected Disk stationDisk = new Disk();
/**
* The station's Transaction representing a group purchase
*/
protected Transaction stationTransaction = null;
public TicketingEngine(String userID, String password)
{
stationDisk.readFromDisk();
stationDisk.validateUser(userID, password);
}
/**
* Returns the UserSet representing the permissable users of
* the system if the user has called validateUser successfully.
* @return UserSet the set of permissable users.
*/
public UserSet getUserSet()
{
return null;
}
/**
* Validates a user by checking the input data with internal
* values and returns an int specifying an access value.
* @param String the user name
* @param String the user's password
* @return int the access value
* @see Constants
*/
public int validateUser(String user, String password)
{
return -1;
}
/**
* Resets system, resulting in the locking of the system.
* @return boolean status of logOff.
*/
public boolean logOffSystem()
{
return false;
}
/**
* Adds the specified BoughtItem to the tempory Transaction.
* @param BoughtItem the BoughtItem, which is to be added
* @return boolean the state of the adding operation
*/
public boolean addItem(BoughtItem boughtItem)
{
return false;
}
/**
* Adds the specified BoughtItem of the specified type and
* category to the Transaction.
* @param int the ticket type as referenced in Constants.
* @param BoughtItem the BoughtItem, which is to be added
* @return boolean the state of the adding operation
* @see Constants
*/
public boolean addItem(int ticketType, BoughtItem sale)
{
return false;
}
/**
* Removes the BoughtItem with the same type and name
* as the dummy BoughtItem from the Transaction.
* @param int the ticket type as referenced in Constants.
* @return boolean the state of the removal operation.
* @see Constants
*/
public boolean removeItem(int ticketType)
{
return false;
}
/**
* Returns an int specifying the number of BoughtItems of
* a specific type, as referenced in Constants.
* @param int the ticket type
* @return int the number of BoughtItems of the specified type
*/
public int numberOf(int ticketType)
{
return -1;
}
/**
* Amalgamates the Adult and Children tickets.
*/
public void amalgamate(){}
/**
* Amalgamates a school group and returns a boolean
* specifying whether the discount could be applied.
* @return boolean Discount applicable yes/no
*/
public boolean applyEducationalDiscount()
{
return false;
}
/**
* Returns the index of the specified tickettype
* @param int the ticket type as specified in Constants
* @return int the index of the Lookup.
* @see Constants
*/
public int lookUpIndex(int ticketType)
{
return -1;
}
/**
* Returns the SaleItem at the specified index.
* @param int the index of the SaleItem
* @return SaleItem the lookup
* @see Constants
*/
public SaleItem lookUpSaleItem(int index)
{
return null;
}
// ///////////// //
// 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.