REPOST sorry
My code was not complete....please forgive me
/*
* Main.java
*
* Created on May 23, 2007, 10:12 AM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
/**
*
* @author Pete Berardi
*/
import java.util.Vector;
import java.util.LinkedList;
publicclass Main
{
private Cup cupArray[];
/** Creates a new instance of Main */
publicstaticvoid main(String args[])
{
Cup cupArray[] =new Cup[10];
cupArray[0]=new Cup ("small","plastic");
cupArray[1]=new Cup ("small","plastic");
cupArray[2]=new Cup ("small","plastic");
cupArray[3]=new Cup ("small","plastic");
cupArray[4]=new Cup ("small","plastic");
cupArray[5]=new Cup ("large","paper");
cupArray[6]=new Cup ("large","paper");
cupArray[7]=new Cup ("large","paper");
cupArray[8]=new Cup ("large","paper");
cupArray[9]=new Cup ("large","paper");
for(int i=0;i<cupArray.length;i++)
{
System.out.print(cupArray[i]);
}
}
}
/*
* Cup.java
*
* Created on May 23, 2007, 10:12 AM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
/**
*
* @author Pete Berardi
*/
publicclass Cup{
private String cupSize;
private String cupMaterial;
publicstaticfinalint LARGE = 1;
publicstaticfinalint SMALL = 0;
publicstaticfinalint PAPER = 2;
publicstaticfinalint PLASTIC =3;
privateint sizeCode;
privateint materialCode;
/** Creates a new instance of Cup */
public Cup(String cupSize, String cupMaterial){
this. cupSize = cupSize;
this.cupMaterial = cupMaterial;
if(cupSize.equals("large"))
sizeCode = LARGE;
else
sizeCode = SMALL;
if(cupMaterial.equals("plastic"))
materialCode = PLASTIC;
else materialCode = PAPER;
}
}
>

