public void addData(String store, String newName, int newDemand, double newSetup, double newUnit, double newInventory, double newPrice)
//Method that sets the data value for a product
{
if (store.equalsIgnoreCase("callaghan"))//!!!!Goes from this line in the debugger
if (noOfProductsCallaghan==0)
{
setData(product[0], newName, newDemand, newSetup, newUnit, newInventory, newPrice);
noOfProductsCallaghan++;
}
else if (noOfProductsCallaghan==1)
{
setData(product[1], newName, newDemand, newSetup, newUnit, newInventory, newPrice);
noOfProductsCallaghan++;
}
else if (noOfProductsCallaghan==2)
{
setData(product[2], newName, newDemand, newSetup, newUnit, newInventory, newPrice);
noOfProductsCallaghan++;
}
else if (store.equalsIgnoreCase("lambton"))
if (noOfProductsLambton==0)
{
setData(product[0], newName, newDemand, newSetup, newUnit, newInventory, newPrice);
noOfProductsLambton++;
}
else if (noOfProductsLambton==1)
{
setData(product[1], newName, newDemand, newSetup, newUnit, newInventory, newPrice);
noOfProductsLambton++;
}
else if (noOfProductsLambton==2)
{
setData(product[2], newName, newDemand, newSetup, newUnit, newInventory, newPrice);
noOfProductsLambton++;
}
}//!!!!Straight to this line in the debugger