UML

简答

1.Why are linear approaches not preferred for software development?

  • In linear approaches, the requirements for the software system are finalized(确定) before the design phase. Once the SRS for the software is developed, the approach assumes that there will be no change in the requirements. However, this is not true for most projects. The requirements for such software evolve during the development process and, therefore, cannot be finalized in the beginning of the project. As a result, linear approaches are not preferred.
    线性方法中的需求已经被确定了,而大多数项目要求在开发过程中还要进行演变,所以线性方法不适合。

2.What is the main advantage of the object-oriented design approach over the function-oriented design approach?

  • The object-oriented design approach applies reuse engineering on classes. The object-oriented design approach supports the inheritance of attributes and operations among classes, which enables the reusability of code.
    面向对象的设计方法将重用工程应用于类。面向对象的设计方法支持类之间的属性和操作的继承,从而实现代码的可重用性。
  • The function-oriented design approach is module-centric and concentrates on functions of the software. As a result, it is difficult to separate the construction of one module from the other. Reusability of the software becomes difficult as functions become complex. Another limitation of the function-oriented approach is that data is visible and accessible across the program.
    面向功能的设计以模型为中心,注重软件功能,导致难以从其他模块分离出一个模块结构。随着功能变得复杂软件的重用性变得难以实现,面向功能的方法的数据对其他应用可见,可跨应用访问。

3.What is the difference between OOPs and OOAD?

  • Although the concept behind OOAD and OOPs is similar, OOAD is an analysis and design technique used in the analysis and design phases of the SDLC. However, OOPs is a programming technique used in the coding phase of the SDLC.
    OOAD被用在分析与设计阶段,OOPS正常被用在软件开发生命周期的编码阶段

4.What does a deployment diagram represent?

  • A deployment diagram represents all the nodes required to deploy the software, such as the client and server nodes that contains the various components of the software system.
    部署关系图表示部署软件所需要的所有节点,例如包含软件系统各种组件的客户端和服务器节点
  • The deployment diagram also represents the relationship among the various nodes of the system.
    也表示系统节点间的关系

5.Which UML diagrams can you use to design the system architecture?

  • You can use the component and deployment diagrams to design the system architecture.
    组件图和部署图

6.How can use cases help increase the project quality?

  • You map the use cases with the features of the software system to ensure that use cases for all the features have been identified.
    用例与软件系统特性对应,保证所有特性都被用例确定
  • Similarly, the code that is generated in the implementation phase is mapped with the use cases to verify that the code implements the functions of all the use cases.实现阶段生成的代码与用例对应,保证实现所有用例的功能

7.What is a use case driven model?

  • In a use case driven model(用例驱动模型), use cases are used throughout the Software Development Life Cycle (SDLC). You model requirements by using use cases, and then create class diagrams using the use cases identified in the requirements analysis phase. (使用在需求分析阶段定义的用例去创造类图)You also use the use cases to generate the test cases in the testing phase of the SDLC. (你也需要在软件开发的生命周期去使用用例去生成测试用例)Finally, you use the use cases for requirement traceability.
    在用例驱动模型里面,用例可以被应用于整个软件开发周期。使用用例对需求建模,然后使用在需求分析阶段被确定的用例来创建类关系图,在测试阶段使用用例来生成测试用例,使用用例进行需求跟踪。

8.What is use case realization?

  • Use case realization is a collaboration of classes that interact with each other to realize a use case. Use case realization describes how the functions of a particular use case are implemented in the design model.
    用例实现是相互交互以实现用例的类的协作。描述了在设计阶段特定用例的功能是如何实现的。

9. How is a class diagram different from an object diagram?

  • A class diagram represents classes, their attributes, operations, and relationships. Conversely, an object diagram represents objects, their attribute values, and relationships. An object in a class diagram is an instance of a class in a class diagram.
    类关系图表示类,类的属性、操作和关系。对象关系图表示对象,对象属性值和关系。对象图中的对象是类图中类的实例

10.What is the difference between aggregation and composition?

  • An aggregation relationship between two classes indicates that a class is a part of another class. Conversely, in a composition relationship, one class contains another class. For example, in an order management system, a customer can place multiple orders. Therefore, the Customer and Order classes share an aggregation relationship. Every order consists of the order information. Therefore, the Order and OrderDetail classes share a composition relationship.
    聚合:类a是类b的一部分,并且类a可独立存在。组合:类a包含类b,且类a控制类b的生命周期

11.What is the difference between a sequence diagram and a communication diagram?

  • Sequence diagram and communication diagram are the two most commonly used types of interaction diagrams. The difference between sequence and communication diagrams is that sequence diagrams depict the flow of control of messages by time ordering as opposed to communication diagrams that emphasize on the organization of objects to depict the flow of control of messages.
    序列图按时间表示信息控制流,而通信图着重表示信息对象的结构化组织。

12.What does an activity diagram illustrate(说明)?

  • An activity diagram shows the workflow or an operation in terms of the sequence of activities and transitions.
    活动图根据活动和转换顺序显示工作流程或操作。
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 219,366评论 6 508
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,521评论 3 395
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 165,689评论 0 356
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,925评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,942评论 6 392
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,727评论 1 305
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,447评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,349评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,820评论 1 317
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,990评论 3 337
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,127评论 1 351
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,812评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,471评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,017评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,142评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,388评论 3 373
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,066评论 2 355

推荐阅读更多精彩内容