软件需求分析英文课件:Chap 12-Model Refinement_第1页
软件需求分析英文课件:Chap 12-Model Refinement_第2页
软件需求分析英文课件:Chap 12-Model Refinement_第3页
软件需求分析英文课件:Chap 12-Model Refinement_第4页
软件需求分析英文课件:Chap 12-Model Refinement_第5页
已阅读5页,还剩70页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Elaboration Iteration 3Intermediate TopicsCh30. Relating Use CasesCh31. More SSDs and ContractsCh32. Domain Model Refinement1Chapter 30. Relating Use CasesObjectivesRelate use cases with include and extend associations, in both text and diagram formats.2IntroductionUse cases can be related to each o

2、ther. Should that be an include or an extend relationship? Should we specialize this use caseOrganizing use cases into relationships has no impact on the behavior or requirements of the system. Guideline: Avoid Agonizing Over Use Case RelationshipsThe important use case work: writing use case textOf

3、ten way too much unproductive time is spent debating how to relate use cases in a use case diagram 3The include RelationshipIt is common to have some partial behavior that is common across several use cases“paying by credit” occurs in “Process Sale”, “Process Rental”, “Contribute to Lay-away Plan”Fa

4、ctor out subfunction use cases and use the include relationship when: Separate use cases into its own subfunction use case to avoid repetition.Decompose an overwhelmingly long use case into subunits to improve comprehension.4Example56Using include with Asynchronous Event HandlingAnother use of the i

5、nclude relationship is to describe the handling of an asynchronous eventwhen a user is able to, at any time, select or branch to a particular window, function, or Web page, or within a range of steps.The basic notation is to use the a*, b*, . style labels in the Extensions section.7SummaryThe includ

6、e relationship can be used for most use case relationship problems.Factor out subfunction use cases and use the include relationship when:They are duplicated in other use cases.A use case is very complex and long, and separating it into subunits aids comprehension.As a first rule of thumb, always us

7、e the include relationship between use cases over other relationships.8Terminology: Concrete, Abstract, Base, and Addition Use CasesA concrete use case is initiated by an actor and performs the entire behavior desired by the actor. EPB, Process Sale An abstract use case is never instantiated by itse

8、lf; it is a subfunction use case that is part of another use case Handle Credit Payment A use case that includes another use case, or that is extended or specialized by another use case is called a base use casProcess Sale The use case that is an inclusion, extension, or specialization is called an

9、addition use case. Handle Credit Payment 9The extend RelationshipHow to append to the use case without modifying its original text?Use the extend relationshipCreate an extending or addition use case, and within it, describe where and under what condition it extends the behavior of some base use case

10、.Extension pointLabels in the base use case which the extending use case references as the point of extensionIndeed, just updating the Extensions section is usually the preferred solution, rather than creating complex use case relationships.1011The generalize RelationshipA common observation by use

11、case consultants is that complications result and unproductive time is spent on the addition of many use case relationships.12Use Case Diagrams1314Chapter 31. More SSDs and ContractsObjectivesDefine SSDs and operation contracts for the current iteration.15NextGen POSNew System Sequence DiagramsIn th

12、e current iteration, the new payment handling requirements involve new collaborations with external systems.It is useful to illustrate the new system events in SSDs in order to clarifyNew system operations that the NextGen POS system will need to supportCalls to other systems, and the responses to e

13、xpect from these calls16Common Beginning of Process Sale Scenario17SSD common beginningCredit Payment SSD18Check payment SSD19New System OperationsIn this iteration, the new system operations that our system must handle are:makeCreditPaymentmakeCheckPaymentmakePayment is renamed to makeCashPayment.2

14、0New System Operation Contracts2122Chapter 32. Domain Model RefinementObjectivesRefine the domain model with generalizations, specializations, association classes, time intervals, composition, and packages.Identify when showing a subclass is worthwhile.23New Concepts for the NextGen Domain ModelThe

15、UP Domain Model may be incrementally developed by considering the concepts in the requirements for this iteration.Concept Category List Noun phrase identification 24Noun Phrase Identification from the Use Cases25Noun Phrase Identification from the Use Cases(cont.)26GeneralizationGeneralization is th

16、e activity of identifying commonality among concepts and defining superclass (general concept) and subclass (specialized concept) relationships. It is a way to construct taxonomic classifications among concepts which are then illustrated in class hierarchiesIdentify domain superclasses and subclasse

17、s relevant to the current iteration, and illustrate them in the Domain Model.27Generalization-specialization hierarchy28Defining Conceptual Superclasses and SubclassesGeneralization and Conceptual Class DefinitionDefinition: A conceptual superclass definition is more general or encompassing than a s

18、ubclass definition.29Generalization and Class SetsDefinition: All members of a conceptual subclass set are members of their superclass set.30Venn diagram of set relationshipsConceptual Subclass Definition Conformance100% Rule100% of the conceptual superclasss definition should be applicable to the s

19、ubclass. The subclass must conform to 100% of the superclasss:attributesassociations31Conceptual Subclass Set ConformanceIs-a RuleAll the members of a subclass set must be members of their superclass set.In natural language, this can usually be informally tested by forming the statement: Subclass is

20、 a Superclass. (is-a-kind-of)Eg. CreditPayment is a Payment32What Is a Correct Conceptual Subclass?apply the following tests to define a correct subclass when constructing a domain modelA potential subclass should conform to the:100% Rule (definition conformance)Is-a Rule (set membership conformance

21、)33When to Define a Conceptual Subclass?A conceptual class partition is a division of a conceptual class into disjoint subclasses When is it useful to show a conceptual class partition?34Motivations to Partition a Conceptual Class into SubclassesCreate a conceptual subclass of a superclass when:The

22、subclass has additional attributes of interest.The subclass has additional associations of interest.The subclass concept is operated on, handled, reacted to, or manipulated differently than the superclass or other subclasses, in ways that are of interest.The subclass concept represents an animate th

23、ing (for example, animal, robot) that behaves differently than the superclass or other subclasses, in ways that are of interest35Example subclass partitions36Example subclass partitions(cont.)37When to Define a Conceptual Superclass?Create a superclass in a generalization relationship to subclasses

24、when:The potential conceptual subclasses represent variations of a similar concept.The subclasses will conform to the 100% and Is-a rules.All subclasses have the same attribute that can be factored out and expressed in the superclass.All subclasses have the same association that can be factored out

25、and related to the superclass.38NextGen POS Conceptual Class HierarchiesPayment Classes39Authorization Service Classes4041Authorization Transaction ClassesOne possible class hierarchy for external service transactions42An alternate transaction class hierarchyAuthorization Transaction ClassesAbstract

26、 Conceptual ClassesIf every member of a class C must also be a member of a subclass, then class C is called an abstract conceptual class.43Abstract Class Notation in the UMLIdentify abstract classes and illustrate them with an italicized name in the Domain Model, or use the abstract keyword.44Modeli

27、ng Changing StatesDo not model the states of a concept X as subclasses of X. Rather, either:Define a state hierarchy and associate the states with X,orIgnore showing the states of a concept in the domain model; show the states in state diagrams instead.45Class Hierarchies and Inheritance in Software

28、This discussion of conceptual class hierarchies has not mentioned inheritance, because the discussion is focused on a domain model conceptual perspective, not software objects.Inheritance is a software mechanism to make superclass things applicable to subclasses.The conceptual class hierarchies gene

29、rated here may or may not be reflected in the Design Model.46Association ClassesWhere in the UP Domain Model should the merchant ID attribute reside?Authorization services assign a merchant ID to each store for identification during communications.A payment authorization request from the store to an

30、 authorization service needs the merchant ID that identifies the store to the service.Furthermore, a store has a different merchant ID for each service47Inappropriate use of an attributeFirst attempt at modeling the merchantID problemIn a domain model, if a class C can simultaneously have many value

31、s for the same kind of attribute A, do not place attribute A in C. Place attribute A in another class that is associated with C.48An association classThe merchantID may be thought of as an attribute related to the association between Store and AuthorizationService.49Guidelines for adding association

32、 classesClues that an association class might be useful in a domain model:An attribute is related to an associationInstances of the association class have a lifetime dependency on the associationThere is a many-to-many association between two concepts and information associated with the association

33、itself50Some examples of association classes51Aggregation Aggregation is a vague kind of association loosely suggests whole-part relationships It has no meaningful distinct semantics in the UML versus a plain associationFollowing the advice of UML creators, dont bother to use aggregation in the UML;

34、 rather, use composition when appropriate.52aggregationCompanyEmployeeCompositionComposition, also know as composite aggregationa strong kind of whole-part aggregation and is useful to show in some models .A composition relationship implies that An instance of the part (such as a Square) belongs to

35、only one composite instance (such as one Board) at a time The part must always belong to a composite (no free-floating Fingers) The composite is responsible for the creation and deletion of its parts53compositionHandFingerHow to Identify CompositionConsider showing composition when:The lifetime of t

36、he part is bound within the lifetime of the compositethere is a create-delete dependency of the part on the whole.There is an obvious whole-part physical or logical assembly.Some properties of the composite propagate to the parts, such as the location.Operations applied to the composite propagate to

37、 the parts, such as destruction, movement, recording.On composition: If in doubt, leave it out54A Benefit of Showing CompositionDiscover and show composition because it has the following benefitsIt clarifies the domain constraints regarding the eligible existence of the part independent of the whole

38、. It assists in the identification of a creator (the composite) using the GRASP Creator pattern.Operations(such as copy and delete) applied to the whole often propagate to the parts.55Composition in the NextGen Domain Model56Time Intervals and Product PricesIssue of time intervals associated with in

39、formation, contracts(Fixing an Iteration 1 Error)SalesLineItems were associated with ProductDescriptions, that recorded the price of an itemWhat is needed is a distinction between the historical price when the sale was made, and the current price57Association Role NamesA role name identifies an end

40、of an association and ideally describes the role played by objects in the association58Roles as Concepts versus Roles in Associations59Derived ElementsA derived element can be determined from othersAttributes and associations are the most common derived elements. When should derived elements be show

41、n?Avoid showing derived elements in a diagram, since they add complexity without new information.Add a derived element when it is prominent in the terminology, and excluding it impairs comprehension.Derived Elements6161Derived attributeDerived attribute related to multiplicityQualified AssociationsA qualifier may be used in an association; it distinguishes the set of objects at the far end of the association based on the qualifier value. An association with a qualifier is a qu

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论