Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Something like this?<br/> <img src="https://i.stack.imgur.com/YK66g.png" alt="enter image description here"><br/> <strong>EDIT0:</strong> and a simple object diagram sample<br/> <img src="https://i.stack.imgur.com/WGApr.png" alt="enter image description here"><br/> <br/> <strong>Edit1:</strong><br/> explanation: in object diagram you should specify the value of each variable, here the <code>i=1990</code> is an example, it could be any number. </p> <pre><code>A a=new new A(); a.setI(1990); </code></pre> <p>as you see, there are two instances of class <code>A</code> named <code>a</code> and <code>a1</code>.</p> <pre><code>A a=new A(); A a1=new A(); </code></pre> <p>The <code>a1</code> reference has no value for variable c, so it's <code>null</code>.<br/><br/> class <code>B</code> doesn't have anything(attribute) here.<br/> in class <code>A</code>, the b variable is a array of class <code>B</code>, so <code>a</code> variable has two <code>B</code> references(<code>b0</code>,<code>b1</code>) and a <code>null</code> value.</p> <pre><code>B b0=new B(); B b1=new B(); a.setB(new B[]{b0,b1,null}); //// B b2=new B(); a1.setB(new B[]{null,null,b2}); </code></pre> <p>and about the <code>:C</code> and <code>:Vector&lt;C&gt;</code>, why doesn't it have a name lie <code>a1</code> or <code>b0</code>? because there is no need for pointer(reference) for the class, so it doesn't need a pointer, in other word an object from <code>Vector&lt;&gt;</code> and two objects from <code>C</code> are created and passed to the host class <code>A</code>.</p> <pre><code>a.setC(new Vector&lt;C&gt;()); a.getC().put(new C(a)); a.getC().put(new C(a)); </code></pre> <p>and about the <code>owner</code> in <code>C</code> class, assume that the owner is set during the object creation by constructor, or has set by a indirect reference (using <code>A.c</code>).<br/> <br/> I hope I could give some hand dude. Software: UMLet</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload