title: Change specific object values in an array
body: <p>I need to change the <code>fuelType</code> and <code>mode</code> independently in each of the separate stations but I cant figure out how, I can print the array but can't figure out changing its contents</p>
  <pre><code>station = new Pumps [10];
  
      station[0] = new Pumps(&quot; P101&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
      station[1] = new Pumps(&quot; P102&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
      station[2] = new Pumps(&quot; P103&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
      station[3] = new Pumps(&quot; P104&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
      station[4] = new Pumps(&quot; P105&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
      station[5] = new Pumps(&quot; P201&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
      station[6] = new Pumps(&quot; P202&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
      station[7] = new Pumps(&quot; P203&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
      station[8] = new Pumps(&quot; P204&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
      station[9] = new Pumps(&quot; P205&quot;, &quot;Idle&quot;, &quot;Default&quot;, 0.0, 0.0, 0.0);
  </code></pre>
  <p>The user needs to find the station by its ID which is eg. P101, then change each value that says
  Idle and Default</p>
  <p>This is my object class:</p>
  <pre class="lang-java prettyprint-override"><code>public class Pumps {
  
      private String pumpID;
      private String mode;
      private String fuelType;
      private double total;
      private double pumpOutPut;
      private double pumpInTake;
  
  
      //Constructor
      public Pumps ( String pumpID, String mode, String fuelType, double total ,
                    double pumpOutPut, double pumpInTake){
          this.pumpID = pumpID;
          this.mode = mode;
          this.fuelType = fuelType;
          this.total = total;
          this.pumpOutPut = pumpOutPut;
          this.pumpInTake = pumpInTake;
  
      }
      //*************Pump-ID*********************
      public String getPumpID() {
          return pumpID;
      }
  
      public void setPumpID(String pumpID) {
          this.pumpID = pumpID;
      }
  
  
  
  
      //*************MODE*********************
  
      public void setMode(String newMode) {
          this.mode = newMode;
      }
  
  
  
      public String getMode() {
          return mode;
      }
  
      //*************FUEL-TYPE*********************
  
      public void setFuelType(String newFuelType) {
          this.fuelType = newFuelType;
      }
  
      public String getFuelType() {
          return fuelType;
      }
      //*************PUMP-IN-TAKE*********************
  
  
      public void setPumpInTake(double pumpInTake) {
          this.pumpInTake = pumpInTake;
      }
  
  
      //**************PUMP-OUT-PUT********************
      public void setPumpOutPut(double pumpOutPut) {
          this.pumpOutPut = pumpOutPut;
      }
  
      //*************TOTAL*********************
  
      public void setTotal(double total) {
          this.total = total;
      }
  }
  </code></pre>