Can someone help me? I'm so frustrated I'm about ready to quit and start from scratch, but I think I'm close to a working program. Here's my code so far, I'll list the spots where I'm getting errors in bold. I just can't figure out what it is I'm missing here.
java
/*
* Java programming Pt 2. Modify the Inventory Program so the application can
* handle multiple items. Use an array to store the items. The output should
* display the information one product at a time, including the item number, the
* name of the product, the number of units in stock, the price of each unit,
* and the value of the inventory of that product. In addition, the output
* should display the value of the entire inventory.
*/
package invtprgmpt2;
import java.util.Scanner;
import java.util.Arrays;
public class Main
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
//declare product variables
String[] myArray = new String[100];
String productName[] = new String[100]; //product name array
int itemNumber[] = new int[100]; //item number array
int units[] = new int[100]; //unit number array
float priceUnit[] = new float[100]; //priceUnit array
int itemIndex = 0; //product index
float productValue[] = new float[100];
float totalValue = 0;
Arrays.sort(myArray);
//print out request headings
System.out.println( "\nProduct Project Pt2");
System.out.println( "\nEnter Software Information...");
//enter variables
System.out.print( "\nEnter Software Name or stop to quit:" );
productName[itemIndex] = input.nextLine();
//compare user input to termination string
while (productName[itemIndex].equals("stop")) //continue
System.out.print("Enter the item code, if any: ");
itemNumber[itemIndex] = input.nextInt();
System.out.print("Enter the number of software units: ");
units[itemIndex] = input.nextInt();
System.out.print("Enter the price for each unit: ");
priceUnit[itemIndex] = input.nextFloat();
itemIndex = itemIndex + 1; //should increment by 1
input.nextLine(); //clear buffer
System.out.print( "\nEnter Software Name or stop to quit");
} //end while
//print output
// prints output headings
{
System.out.printf( "\n%s\t%s\t%s\t%s\t%s\t%s\n", "Index", "Product #", "Product Name",
"# in Stock", "Unit Price", "Inventory Value");
// method to sort items by name
java.util.Arrays.sort(productName);
// print product list with inventory values
for (int index = 0; index < itemIndex; index++)
System.out.printf( "%5d\t%9d\t%12s\t%10d\t$%10.2f\t$%14.2f\n", index+1, productNumber[index], productName[index],
units[index], priceUnit[index], productValue[index] = ( units[index] * priceUnit[index]));
// add each product value to determine total inventory value
for ( int index = 0; index < itemIndex; index++ )
totalValue += productValue[index];
System.out.printf( "\nTotal inventory value: %.2f\n" , totalValue );
}// end main
}
package invtprgmpt2;
/**
*
* @author Richard Jarke
*/
public class product
{
private int itemNumber;
private String productName;
private int units;
private float priceUnit;
public Product(int itemNumber, String productName, int units, float priceUnit)
{
this.itemNumber = itemNumber;
this.productName = productName;
this.units = units;
this.priceUnit = priceUnit;
} //end constructor
public int getItemNumber()
{
return itemNumber;
}
public void setItemNumber(int itemNumber)
{
this.itemNumber = itemNumber;
}
public float getPriceUnit()
{
return priceUnit;
}
public void setPriceUnit(float priceUnit)
{
this.priceUnit = priceUnit;
}
public String getProductName()
{
return productName;
}
public void setProductName(String productName)
{
this.productName = productName;
}
public int getUnits()
{
return units;
}
public void setUnits(int units)
{
this.units = units;
}
public float getProductValue()
{
float number = getUnits() * getPriceUnit();
return number;
}
}
Mod Edit: Please use code tags when posting your code. Code tags are used like so =>

Thanks,
PsychoCoder