Search:

Type: Posts; User: yah

Search: Search took 0.09 seconds.

  1. Replies
    17
    Views
    925

    Re: sum of array values

    it says in the book we have to set it to static. :) Right now i am updating my array to take a double itemInventoryValue field. Then maybe i can use that value to get the totalInventoryValue .
  2. Replies
    17
    Views
    925

    Re: sum of array values

    thanks very much for the help. I still couldn't get it to work properly. I tried moving the statement to the actionlistener and call it from the itemListener so it doesn't affect the value when the...
  3. Replies
    17
    Views
    925

    Re: sum of array values

    the totalInventoryValue is the variable that stores the sum of each items itemInventoryValue (quantity*price). It is supposed to display the TOTAL sum of all itemInventoryValue regardless if any...
  4. Replies
    17
    Views
    925

    Re: sum of array values

    I was working on taking the loops out. Unfortunately, each time I select an item in the choice box the totalInventoryValue gets summed up with the previous selections and it still doesn't remain...
  5. Replies
    17
    Views
    925

    Re: sum of array values

    i think i used that statement before but it would still sum up the itemInventoryValue then multiply by array.length then when i click on another item in the choicebox the totalInventoryValue would...
  6. Replies
    17
    Views
    925

    Re: sum of array values

    i've tried this statement many times before but when i select another item in the choice box the itemInventoryValue for the previous item gets added to the totalInventoryValue of the item multiplied...
  7. Replies
    17
    Views
    925

    Re: sum of array values

    i populate my choicebox.



    public InventoryControlGUIapp()
    {
    super ("INVENTORY CONTROL GUI APP");

    itemsArray[0] = new Items(87, "Wrench", 5, 13.23); //4. Populate array reference...
  8. Replies
    17
    Views
    925

    Re: sum of array values

    hi. sorry i fell asleep. it was really late. Thanks for the reply and I hope I didn't post in the wrong section. so when i select an item in the choice box it is supposed to calculate the sum of the...
  9. Replies
    17
    Views
    925

    sum of array values

    hello. im having trouble getting the total inventory value in an array. It would loop the items in the choicebox by item but wouldn't add the item values together.

    itemsArray[0] = new Items(87,...
Results 1 to 9 of 9