title: Mapping UML diagram to Java code conversion
body: <p><a href="https://i.stack.imgur.com/T1PJj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T1PJj.jpg" alt="UML diagram"></a></p>
  
  <p>Hello, I'm trying to to convert this UML diagram to java code directly, and below is my code which doesn't seem to compile anyways. I'm not very sure about how to place the optional multiplicities in, e.g. 0..* and 0..1. Thank you for your help.</p>
  
  <pre><code>public class Person{
      private String name;
      private Person mom;
      private Person dad;
      private ArrayList&lt;Person&gt; child;
      private ArrayList&lt;Person&gt; friend;
      private ArrayList&lt;School&gt; alumni;
      private School current = new School();
  
      public Person(String name, Person mom, Person dad, ArrayList&lt;Person&gt; child, ArrayList&lt;Person&gt; friend, ArrayList&lt;School&gt; alumi, School current){
          name = this.name;
          mom = this.mom;
          dad = this.dad;
          child = this.child;
          friend = this.friend;
          alumni = this.alumni;
          current = this.current;
      }
  }
  
  public class School{
      private String name;
      private ArrayList&lt;Person&gt; student;
  
      public School(String name, ArrayList&lt;Person&gt; student){
          name = this.name;
          student = this.student;
      }
  }
  </code></pre>