Why threads are needed in my given assignment in java? : <p><strong>I'm not asking to do my assignment. Read carefully</strong></p>

<blockquote>
  <p>Write a program to simulate a bus traveling between 5 different stations and
  repeats the cycle, the bus can take up to a maximum of 50 persons, at each
  station random number of persons get off the bus and random number of
  persons get on the bus, consider these cases.</p>
  
  <ul>
  <li>If bus does not have enough space for all persons, persons will have to
  stay in station for next cycle</li>
  <li>Persons cannot mount on bus until persons on bus dismount first.</li>
  <li>You can simulate bus trip with a fixed delay between each stop to
  simulate travel time.</li>
  <li>Persons can not mount/dismount the bus until bus arrives to the
  designated station.</li>
  </ul>
  
  <p>Use semaphores to control access to the bus and other utilities to control access
  to bus. Use thread pools to manage thread management. You can use latches,
  cyclic barriers, re-entrant locks and condition variables to write your code.</p>
</blockquote>

<p>I have implemented this in java without making threads and using semaphores. I Just used nested loop to cycle the bus and the whole procedure is working fine. I'm not asking you to do my assignment, all I need to know where should I use threads in this code. </p>

<p>Here is my code :</p>

<pre><code>import java.util.*;
import java.lang.*;
public class buses {
    int capacity;
    int station;
    ArrayList&lt;Integer&gt; remaining=new ArrayList&lt;&gt;();

public void run(int n) {
    System.out.println("--Station "+(n+1)+"--");
    if(this.capacity&lt;50)
    {
        Random rand1 = new Random();
        int unload = rand1.nextInt(50);
        unload += 1;

        while(unload&gt;50-this.capacity)
        {
            rand1 = new Random();
            unload = rand1.nextInt(50);
            unload += 1;
        }
        System.out.println("Unloaded : "+unload);
        this.capacity+=unload;
        System.out.println("Capacity "+this.capacity);
    }

    Random rand = new Random();
    int load = rand.nextInt(50);
    load += 1;
    System.out.println("random load:"+load);
    int val=remaining.get(n);
    System.out.println("Remaining pessenger at station"+(n+1)+" were:"+val);
    load=load+val;
    System.out.println("random load:"+load);
    if(load&lt;=this.capacity)
    {
        System.out.println("Loaded "+(load));
        capacity-=load;
        System.out.println("Capacity "+this.capacity);
        remaining.set(n, 0);
    }
    else if(load&gt;this.capacity)
    {
        int notToBeLoaded=load-this.capacity;
        System.out.println("Loaded "+(load-notToBeLoaded));
        capacity=0;
        System.out.println("Capacity "+this.capacity);
        remaining.set(n, notToBeLoaded);
    }
    station++;
}
public buses()
{
    this.capacity=50;
    this.station=1;
    this.delay=2000;
}
public static void main(String[] args) {
    buses obj=new buses();
    obj.remaining.add(0);
    obj.remaining.add(0);
    obj.remaining.add(0);
    obj.remaining.add(0);
    obj.remaining.add(0);
    for(int j=0;j&lt;2;j++)
    {
        for(int i=0;i&lt;5;i++)
        {
            obj.run(i);
        }
    }
    //System.out.println("remaining 0:"+obj.remaining.get(0));
    //System.out.println("remaining 1:"+obj.remaining.get(1));
    //System.out.println("remaining 2:"+obj.remaining.get(2));
    //System.out.println("remaining 3:"+obj.remaining.get(3));
    //System.out.println("remaining 4:"+obj.remaining.get(4));
}

}
</code></pre>
