View Single Post
  #2 (permalink)  
Old 12-12-2007, 09:51 AM
revathi17 revathi17 is offline
Member
 
Join Date: Aug 2007
Posts: 22
revathi17 is on a distinguished road
From what you have posted, there is a problem in the Inventory class, you have to change the return and put it at the end, like this:
Code:
.... class Inventory { DVD movies[] = new DVD[100]; // Add to inventory public void addToInventory(DVD movie) { } // Get inventory value public double getInventoryValue() { Inventory myInventory = new Inventory(); myInventory.addToInventory(new DVD(1, "Remember the Titans", 5, 14.95)); // Print out the inventory total value System.out.println("Total value of inventory is: " + myInventory.getInventoryValue()); return myInventory.getInventoryValue(); } }
I didn't go through the logic, but from the code you had written , I assumed this is what you wanted to do..

Hope this helps,
-R
Reply With Quote