title: Iterate over an ArrayList appending values based on user input
body: <p>I am trying to write a method for changing the values of all Objects in an ArrayList one at a time, based on user input. Users input a value via dialog box, this is then converted to an integer and assigned to a value. </p>
  
  <p>The list is called studentList and is populated with Student objects. These objects have a name and an int value called Result. My problem currently is that my first input value in the dialog box is added to all of the variables at once, and any subsequent entries have no effect. What I need is for the first entry to change the first Object's value and then move through the list to the next object and request another input from the user, and so on. </p>
  
  <p>I am using a bespoke Dialog.request import framework to get the user input. just consider these lines to mean a pop up dialog box is to appear and request user input in string form</p>
  
  <p>Here is my method, which is in a class called Group</p>
  
  <pre><code>public void recordResult()
     {
        int inputResult; 
        String inputString;
        inputString = Dialog.request("Please Enter A Result");
        inputResult = Integer.parseInt(inputString);
  
  
           for(Student s : studentList)
           {
               s.setResult(inputResult);
               inputString = Dialog.request("Please Enter Another Result");
           }
  
     }
  </code></pre>
  
  <p>I think the problem resides within the for loop.</p>
  
  <p>I have tried to exclude any unnecessary code and just included the method I am trying to implement. Other things to assume that the setResult method exists in the Student class, and that studentList is populated. Thanks in advance, i'm hoping it is just a small tweak to be made</p>