Java Inventory Array

I am trying to create a small program for class that allows the user to enter and store inventory items. I am supposed to update it now to store and display multiple items and add a subclass, but I can not get the first part to compile yet. On this part im getting an error message -

cannot find symbol

symbol : class Item

location : class WorkInventory

I am not understanding much of this java programming and am looking for any help I can find in getting a grasp of it.

The code for my program is as follows,

//WorkInventory.java

//Java Inventory Work Products

publicclass WorkInventory

{

// main methods begins execution of java application

publicstaticvoid main( String args[])

{

Item myProduct =new Item();

System.out.println("\n\nItem Name: "+myProduct.getItemName());//display item name

System.out.println("Item Number: "+myProduct.getItemNumber());//display item number

System.out.println("Quantity in Stock:"+myProduct.getStockQuantity());//display quantity in stock

System.out.println("Item Price:$ "+myProduct.getItemPrice());//display item price

System.out.println("Value of Inventory:$ "+myProduct.calculateInventoryValue());//display total value of inventory for this item

System.out.println("\n\nEnter item name or enter the word stop to quit:");//prompt

//myProduct.setItemName(input.next()); // read item name or stop

}// end main method

}//end class WorkInventory

if anyone can offer me any advice it would be greatly appreciated

[2430 byte] By [tkinney2a] at [2007-11-27 9:21:30]
# 1
If you post the code for your Item class we will be able to see where you are going wrong.
JonlWrighta at 2007-7-12 22:15:24 > top of Java-index,Java Essentials,New To Java...
# 2
See, I truly have no grasp of what I am doing here. This is all of what I have from following the text .
tkinney2a at 2007-7-12 22:15:24 > top of Java-index,Java Essentials,New To Java...
# 3
Well in that case I'd suggest starting right at the beginning http://java.sun.com/docs/books/tutorial/getStarted/index.htmlOtherwise you'll just end up confusing yourself more
JonlWrighta at 2007-7-12 22:15:24 > top of Java-index,Java Essentials,New To Java...
# 4

Ok, this is about as basic as I can get and still understand what I am doing. The program is supposed to ask for item name, item number , quantity and price and then calculate the value of the item. After this, I am supposed to use an array to store and display multiple items, but I can not even get this far. I have started back at the very basics, where should I go from here?// InventoryX.java

// Inventory Program

import java.util.scanner;

public class InventoryX

{

//main method begins program

public static void main( String args [] )

{

Scanner input = new Scanner(System.in);

System.out.println("Item Name:");//enter item name

itemName = input.nextString();

System.out.println("Item Number:");//enter item number

itemNumber= input.nextInt();

System.out.println("Quantity in Stock:");//quantity of item

itemQuantity = input.nextInt();

System.out.println("Item Price:");//price of item

itemPrice = input.nextDouble();

itemValue=itemQuantity * itemPrice

System.out.println("Value of Item in Stock is",

itemValue);//display value of stock for item

}// end main method

} end class InventoryX

Any help would be greatly appreciated as I have been unable to learn this from the reading assignments and have no hands on instructor to show me examples.

tkinney2a at 2007-7-12 22:15:24 > top of Java-index,Java Essentials,New To Java...
# 5

> Ok, this is about as basic as I can get and still

> understand what I am doing.

> ...............

> I have started back at the very basics, where

> should I go from here?

It's not enough to just start at the basics, you have to continue on. We can correct your mistakes here, but we can't teach you Java. You must teach yourself. Continue on in the tutorials and in your book til you get a grasp of basic Java. This is going to take a lot of work on your part, but with effort is not impossible. Good luck.

petes1234a at 2007-7-12 22:15:24 > top of Java-index,Java Essentials,New To Java...