Java beginner: classes and methods
<p>I'm a noob and Java is my first programming language.
I've this problem that I'm trying to solve:</p>

<blockquote>
  <p>Define a class to represent a Sugar Bowl sugar characterized by three
  things: total capacity (in grams), available quantity and quantity of
  the spoon (how many grams of sugar takes the spoon associated with
  it). Set in this class:</p>
  
  <ol>
  <li>A constructor method to create a sugar bowl.</li>
  <li>A method that allows to know the amount of sugar in the sugar bowl.</li>
  <li>A method that allows to know how much it takes a spoonful of sugar.</li>
  <li>A method which, given a number of scoops, removes the corresponding amount of sugar, returning this value.</li>
  <li>A method to add sugar. If the supplied value exceeds the available space, the sugar bowl should be full, and the remaining amount
  returned. In other cases, should return zero.</li>
  </ol>
  
  <p>Set the class <code>RunSugarBowl</code> as main and play around.</p>
</blockquote>

<p>public class SugarBowl {</p>

<pre><code>private int totalCapacity;
private int availableSpace;
private int spoonSize;
private int occupiedSpace = totalCapacity-availableSpace;//is the same as amount of sugar in the bowl.

SugarBowl (int totalCapacity){
    availableSpace=totalCapacity;
    spoonSize = totalCapacity/20;//arbitrary size
}

public int spoon(){
    return spoonSize;
}

public int occupied(){
    return occupiedSpace;
}

public void scoops (int numberOfScoops){
    int amountTaken = numberOfScoops * spoonSize;
    if (amountTaken&lt;=occupiedSpace){
        occupiedSpace=occupiedSpace-amountTaken;
        System.out.println(amountTaken);}
    else{
        System.out.println("There's not that amount of sugar in the sugar bowl. Try less.");}       
}
public int addSugar (int addedAmount){
    if (addedAmount&gt;availableSpace){
        int remainingAmount=addedAmount-availableSpace;
        availableSpace=0;
        occupiedSpace = totalCapacity-availableSpace;
        return remainingAmount;}
    else{
         availableSpace = availableSpace - addedAmount;
         occupiedSpace = totalCapacity-availableSpace;
            return 0;}
}
</code></pre>

<p>}</p>

<p>My problem <strong>now</strong> is that my one.occupied method returns 0 instead off the 200 in:</p>

<pre><code>public class RunSugarBowl {
public static void main(String[] args) {
    SugarBowl one = new SugarBowl(200);
    one.addSugar(300);
    System.out.println("Occupied size is : "+ one.occupied());
    }}
</code></pre>
