Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Inventory Array

807600Jul 1 2007 — edited Jul 1 2007
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

public class WorkInventory
{
   // main methods begins execution of java application
   public static void 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2007
Added on Jul 1 2007
5 comments
425 views