title: Matrix not inserting all combinations?
body: <p>Here is my matrix of subjects ....  now I want to make conditionality between subjects</p>
  
  <pre><code>        mat     pro     
  mat     null    null    
  pro     null    null    
  </code></pre>
  
  <p>for example on subject math i inserted subjects value for <code>semester =1</code>     on subject <code>programing</code> i put <code>semester = 4</code>    so I want to fill this matrix with "<code>yes</code>",     only if the <code>semester</code> of first subject is greater than semester on the second subject  and "<code>no</code>" if is not...     now problem that I have is that I can enter conditionalities for combinations:</p>
  
  <pre><code>math - math , which would be "no"
  math - programing , which would be "no"
  programing - programing , which would be "no"
  </code></pre>
  
  <p>and this looks like this when program is done:</p>
  
  <pre><code>        mat     pro     
  mat     no      no  
  pro     no      no
  </code></pre>
  
  <p>but I dont have this combination asked to put conditionality:
  programing - math , which would be "yes"
  and it should probably look like this:</p>
  
  <pre><code>        mat     pro     
  mat     no      no  
  pro     yes     no
  </code></pre>
  
  <p>how do I make this happen? any idea?</p>
  
  <p>here is my code:</p>
  
  <pre><code>public void makeGraph() {
  
      matrix = new String[subjects.size()][subjects.size()];
  
      for (int i = 0; i &lt; matrix.length; i++) {
          for (int j = i; j &lt; matrix.length; j++) {
  
              System.out.println("Enter conditionality between subjects: " + subjects.get(i).getName() + ", and "
                      + subjects.get(j).getName());
  
              boolean conditioned = s.nextBoolean();
  
              if (conditioned == true) {
                  if (subjects.get(i).getSemester() &gt; subjects.get(j).getSemester()) {
                      matrix[i][j] = "yes";
                      matrix[j][i] = "yes";
                  } else {    
                          matrix[i][j] = "no";
                          matrix[j][i] = "no";    
                  }
              } else {
                  matrix[i][j] = "no";
                  matrix[j][i] = "no";
              }
          }
      }
  }
  </code></pre>
  
  <p>EDIT: Here is the link to pastebin I've solved it.
  <a href="https://pastebin.com/PvWurdBc" rel="nofollow noreferrer">Solution</a></p>