public int itemIndex(String itemName){
        if(!this.dataEntered)throw new IllegalArgumentException("no data has been entered");
        int index = -1;
        int jj=0;
        boolean test = true;
        while(test){
            if(itemName.trim().equalsIgnoreCase(this.itemNames[jj].trim())){
                index = jj;
                test = false;
            }
            else{
                jj++;
                if(jj>this.nItems)throw new IllegalArgumentException("Item name, " + itemName + ", is not present in the list of entered item names");
            }
        }
        return index+1;
    }