title: How do i increase size by the value provided as parameter
body: <p>So this code currently just displays a number that is inputed by the user i.e if 65.2 is inputed as a parameter in the main it displays 65.2. But i need to make a method called update that allows the size variable to be updated by the variable put in as a parameter</p>
  <pre><code>public class Population {
  
      // creates a private double variable called size
      private double size;
      // creates a constructor that uses x as the parameter to get the value of size
      Population(double x) {
          this.size = x;
      }
      // makes the size variable public by creating a public method so that it can be sent to the main also returns the value of size
      public double getSize() {
          return size;
  
      }
      public void update() {
  
      }
  </code></pre>
  <p><strong>and this is my main</strong></p>
  <pre><code>public class Main {
  
      public static void main(String args[]) {
  
          Population popSize = new Population(65.2);
          System.out.print(popSize.getSize());
      }
  
  }
  </code></pre>