View Test Results.
package cs221.groupk.ticketing;
import cs221.groupk.common.*;
import java.util.Stack;
/**
* 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.2 Correction of package name and variable naming convention errors.
* @version 0.1 Initial Development
*/
public class ArrayOfStacks
implements StdArrayOfStacks, Constants {
// /////////////////// //
// Instance variables. //
// /////////////////// //
/**
* The core array of stacks.
*/
protected Stack[] stackArray;
// ///////////// //
// Constructors. //
// ///////////// //
/**
* Default constructor creates an ArrayOfStacks of default size.
*/
public ArrayOfStacks(){}
/**
* Secondary constructor creates an ArrayOfStacks of
* specified size.
*/
public ArrayOfStacks(int size){}
// //////// //
// Methods. //
// //////// //
/**
* Returns the number of stacks in this Object.
* @return int the number of stacks
*/
public int getSize()
{
return -1;
}
/**
* Returns an int representing the number of objects in
* a stack at the specified Index.
* @param int the stack-index
* @return int the number of objects
*/
public int getNumberOf(int index)
{
return -1;
}
/**
* Returns a boolean specifying whether the Stack at the specified
* index is empty or not.
* @param int the stack index.
* @return boolean status of specified stack (empty or nonempty)
*/
public boolean isEmpty(int index)
{
return false;
}
/**
* Adds an Object onto the Stack at the specified
* stack-index.
* @param int the stack-index
* @param Object the data-object to be added
* @return boolean the status of the retrieval operation
*/
public boolean addItem(int index, Object dataObject)
{
return false;
}
/**
* Removes the top object of the stack at the specified
* stack-index.
* @param int the stack-index
* @return Object the removed data object
*/
public BoughtItem removeItem(int index)
{
return null;
}
/**
* Returns a handle onto the Object at the top of the stack
* at the specified Stack index.
* @param int the stack-index
* @return Object the retrieved data object
*/
public BoughtItem getItem(int index)
{
return null;
}
// ///////////// //
// Test methods. //
// ///////////// //
/**
* main is the executable bootstrap method called by the Java VM when
* loading this class.
* @param String[] arguments passed from the commandline.
*/
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.