Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    18
    Views
    1,464

    Re: URGENT! Why won't my addToInvoice method work?

    Do some experimenting by changing what the LineItem class's toString() method returns. Some combination of variables and Strings should give you what you want.

    I'm done for tonight.
  2. Replies
    18
    Views
    1,464

    Re: URGENT! Why won't my addToInvoice method work?

    Look at post #6 again. Especially the hint.
  3. Replies
    18
    Views
    1,464

    Re: URGENT! Why won't my addToInvoice method work?

    That means that the first value you added has been lost. If you create a new array every time you add an item, all the items in the previous array are lost. Make sure you create the array one time...
  4. Replies
    18
    Views
    1,464

    Re: URGENT! Why won't my addToInvoice method work?

    I updated my last post. The output for 1 product looked ok.
  5. Replies
    18
    Views
    1,464

    Re: URGENT! Why won't my addToInvoice method work?

    Can you give me the responses I need to make to test the code? Just what I type in.
    I tried this:
    1
    soup
    2.39
    1
    3

    My IDE does not support an active console so I put the responses in a...
  6. Replies
    18
    Views
    1,464

    Re: URGENT! Why won't my addToInvoice method work?

    How do you compile the code you have posted? The compiler needs to know what package a class is in so it can find its definition. The import statement names the package a class is in so the...
  7. Replies
    18
    Views
    1,464

    Re: URGENT! Why won't my addToInvoice method work?

    What variable has the null value that is being printed? Then backtrack in the code to find out why that variable does not have a valid value.

    Produt: Product: Butter Price: $1.29 Price:...
  8. Replies
    18
    Views
    1,464

    Re: URGENT! Why won't my addToInvoice method work?

    Yes, empty slots in an array would have null values. The code should keep track of how many slots in the array are used or test if they have null values before trying to use them.


    The posted...
  9. Replies
    18
    Views
    1,464

    Re: URGENT! Why won't my addToInvoice method work?

    Where are the Strings coming from that have the null values? Start at the the println() statement that printed the null and back track in the code to see where the null value is coming from.


    The...
Results 1 to 9 of 9