Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    14
    Views
    1,310

    [SOLVED] Re: Help how do I get the position out of an array

    There are three class variables in the Rainfall class. Add the definition of the index next to the array it will be used to index into.
  2. Replies
    14
    Views
    1,310

    [SOLVED] Re: Help how do I get the position out of an array

    Which part don't you understand?
    define the index to the rainfall array as a class variable,
    use it to save the value
    increment it for the next time
  3. Replies
    14
    Views
    1,310

    [SOLVED] Re: Help how do I get the position out of an array

    Should the setRain() method store the passed value in ALL of the slots in the rainfall array
    or just in one slot in the array?

    If only one, then it needs to define the index to the rainfall array...
  4. Replies
    14
    Views
    1,310

    [SOLVED] Re: Help how do I get the position out of an array

    Can you explain what the setRain() method is supposed to?
    Then look at the code and see what it does.
  5. Replies
    14
    Views
    1,310

    [SOLVED] Re: Help how do I get the position out of an array

    Could you explain what "isn't working" means?
    Perhaps post some output from the program and add some comments to it describing what is wrong.

    Try debugging the code by adding some println...
Results 1 to 5 of 5