Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>1) What is the relationship between PolicyLayer and PolicyServiceInterface</p> </blockquote> <p>The -----> is <a href="http://publib.boulder.ibm.com/infocenter/rsmhelp/v7r0m0/index.jsp?topic=/com.ibm.xtools.modeler.doc/topics/cassnclss.html" rel="nofollow noreferrer"><code>Association</code></a> ("knows a") </p> <p><a href="http://www.sedris.org/drawings/uml_8.gif" rel="nofollow noreferrer">Association http://www.sedris.org/drawings/uml_8.gif</a></p> <p>C# code:</p> <pre><code>public interface PolicyServiceInterface { } public class PolicyLayer { private IPolicyServiceInterface _policyServiceInterface; // Constructor Assocation public PolicyLayer(IPolicyServiceInterface policyServiceInterface) { _policyServiceInterface = policyServiceInterface; } } </code></pre> <blockquote> <p>2) What is the relationship between PolicyServiceInterface and MachanismLayer.</p> </blockquote> <p>The - - -|> is <a href="http://publib.boulder.ibm.com/infocenter/rsmhelp/v7r0m0/index.jsp?topic=/com.ibm.xtools.modeler.doc/topics/creal.html" rel="nofollow noreferrer"><code>Realization</code></a> ("implements") </p> <p><img src="https://www.tutorialspoint.com/images/uml_realization.jpg" alt="Realization"></p> <p>C# Code:</p> <pre><code>public interface PolicyServiceInterface { } public class MachanismLayer : PolicyServiceInterface </code></pre> <blockquote> <p>3) Do the following have the same meaning: 1) A solid line with a triangle at one end 2) A dashed line with a triangle at one end?</p> </blockquote> <p>No they have different meanings:</p> <p>The -----|> is <a href="http://publib.boulder.ibm.com/infocenter/rsmhelp/v7r0m0/index.jsp?topic=/com.ibm.xtools.modeler.doc/topics/cgeneral.html" rel="nofollow noreferrer"><code>Generalization</code></a> ("inherits") </p> <p><img src="https://www.tutorialspoint.com/images/notation_generalization.jpg" alt="Generalization"></p> <p>C# Code:</p> <pre><code>public class PolicyServiceInterface { } // could also be abstract public class MachanismLayer : PolicyServiceInterface </code></pre> <blockquote> <p>What is the difference between: 1) A solid line with an arrow at one end 2) A dashed line with an arrow at one end</p> </blockquote> <p>The - - -> is <a href="http://publib.boulder.ibm.com/infocenter/rsmhelp/v7r0m0/index.jsp?topic=/com.ibm.xtools.modeler.doc/topics/cdepend.html" rel="nofollow noreferrer"><code>Dependency</code></a> ("uses a") There are various forms of dependency including local variables, parameter values, static function calls or return values. </p> <p><img src="https://www.tutorialspoint.com/images/notation_dependency.jpg" alt="Dependency"></p> <p>C# Code:</p> <pre><code>// Here Foo is dependent on Baz // That is Foo - - -&gt; Baz public class Foo { public int DoSomething() { // A form of local variable dependency Baz x = new Baz(); return x.GetInt(); } } </code></pre> <p>See my answer <a href="https://stackoverflow.com/a/6231433/95573">here</a> for Composition and Aggregation.</p>
 

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