当前位置:编程学习 > C#/ASP.NET >>

设计模式C# 版《桥模式 Bridge》—“自我检验”参考答案

1、分析依赖关系要点:

  1)IA、IB、IC、ID平级正交关系

  2) IE是IA的下级抽象关系

  3)IF和IG是IC的下级抽象关系,而且IC与IG为1:N的关系, II和IH是IG的下级抽象关系

 

  因此,仅从依赖关系分析,如设计配置文件,其结构大致如下:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <sectionGroup name="exercise" type="">
      <section name="a" type=""/>
      <section name="b" type=""/>
      <section name="c" type=""/>
      <section name="d" type=""/>
    </sectionGroup>
  </configSections>

  <exercise>
    <a>
      <e/>
    </a>
    <b/>
    <c>
      <d>
        <add name="d1" type="">
          <i/>
          <h/>
        </add>
        <add name="d2" type="">
          <i/>
          <h/>
        </add>
      </d>
    </c>
    <d/>
  </exercise>
  
</configuration>

 

 

2、

团队职责的用例关系大致如下

\ 

桥模式分解各岗位职责分工后的依赖关系大致如下:

\ 

 

补充:软件开发 , C# ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,