软件需求分析课件: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页,还剩65页未读 继续免费阅读

下载本文档

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

文档简介

1、Elaboration Iteration 3-Intermediate 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

2、other. 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 textO

3、ften 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”F

4、actor 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.4Example56SummaryThe include relationship can be used for most use case rel

5、ationship 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 use the include relationship between use cases ove

6、r other relationships.7Terminology: 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 itself; it is a subfunction use case that is part of

7、 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 caseProcess Sale The use case that is an inclusion, extension, or specialization is called an addition use case. Handle Credit Payment 8The e

8、xtend 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.Extension pointLabels in the base use case whi

9、ch 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.910The generalize RelationshipA common observation by use case consultants is that complications result an

10、d unproductive time is spent on the addition of many use case relationships.11Use Case Diagrams1213Chapter 31. More SSDs and ContractsObjectivesDefine SSDs and operation contracts for the current iteration.14NextGen POSNew System Sequence DiagramsIn the current iteration, the new payment handling re

11、quirements 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 expect from these calls15Common Beginning of Proc

12、ess Sale Scenario16SSD common beginningCredit Payment SSD17Check payment SSD18New System OperationsIn this iteration, the new system operations that our system must handle are:makeCreditPaymentmakeCheckPaymentmakePayment is renamed to makeCashPayment.19New System Operation Contracts2021Chapter 32. D

13、omain Model RefinementObjectivesRefine the domain model with generalizations, specializations, association classes, time intervals, composition, and packages.Identify when showing a subclass is worthwhile.22New Concepts for the NextGen Domain ModelThe UP Domain Model may be incrementally developed b

14、y considering the concepts in the requirements for this iteration.Concept Category List Noun phrase identification 23Noun Phrase Identification from the Use Cases24Noun Phrase Identification from the Use Cases(cont.)25GeneralizationGeneralization is the activity of identifying commonality among conc

15、epts 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 subclasses relevant to the current iteration, and illustr

16、ate them in the Domain Model.26Generalization-specialization hierarchy27Conceptual Subclass Definition Conformance100% Rule100% of the conceptual superclasss definition should be applicable to the subclass. The subclass must conform to 100% of the superclasss:attributesassociations28Conceptual Subcl

17、ass 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 a Superclass. (is-a-kind-of)Eg. CreditPayment is a Payment29What Is a Correct Conceptual Subclass?app

18、ly 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)30When to Define a Conceptual Subclass?A conceptual class partition is a division of a conceptual cla

19、ss into disjoint subclasses When is it useful to show a conceptual class partition?31Motivations to Partition a Conceptual Class into SubclassesCreate a conceptual subclass of a superclass when:The subclass has additional attributes of interest.The subclass has additional associations of interest.Th

20、e 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 thing (for example, animal, robot) that behaves differently than the superclass or other subclasses, in

21、ways that are of interest32Example subclass partitions33Example subclass partitions(cont.)34When to Define a Conceptual Superclass?Create a superclass in a generalization relationship to subclasses when:The potential conceptual subclasses represent variations of a similar concept.The subclasses will

22、 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 and related to the superclass.35NextGen POS Conceptual Class HierarchiesPayment Classes36Authorization

23、 Service Classes3738Authorization Transaction ClassesOne possible class hierarchy for external service transactions39An alternate transaction class hierarchyAuthorization Transaction ClassesAbstract Conceptual ClassesIf every member of a class C must also be a member of a subclass, then class C is c

24、alled an abstract conceptual class.40Abstract Class Notation in the UMLIdentify abstract classes and illustrate them with an italicized name in the Domain Model, or use the abstract keyword.41Modeling Changing StatesDo not model the states of a concept X as subclasses of X. Rather, either:Define a s

25、tate 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.42Association ClassesWhere in the UP Domain Model should the merchant ID attribute reside?Authorization services assign a merchant ID to each store f

26、or identification during communications.A payment authorization request from the store to an authorization service needs the merchant ID that identifies the store to the service.Furthermore, a store has a different merchant ID for each service43Inappropriate use of an attributeFirst attempt at model

27、ing the merchantID problemIn a domain model, if a class C can simultaneously have many values 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.44An association classThe merchantID may be thought of as an attribute related t

28、o the association between Store and AuthorizationService.45Guidelines for adding association 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 ma

29、ny-to-many association between two concepts and information associated with the association itself46Some examples of association classes47Aggregation Aggregation is a vague kind of association loosely suggests whole-part relationships It has no meaningful distinct semantics in the UML versus a plain

30、 associationFollowing the advice of UML creators, dont bother to use aggregation in the UML; rather, use composition when appropriate.48aggregationCompanyEmployeeCompositionComposition, also know as composite aggregationa strong kind of whole-part aggregation and is useful to show in some models .A

31、composition relationship implies that An instance of the part (such as a Square) belongs to 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 parts49composi

32、tionHandFingerHow to Identify CompositionConsider showing composition when:The lifetime of the 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 p

33、ropagate to the parts, such as the location.Operations applied to the composite propagate to the parts, such as destruction, movement, recording.On composition: If in doubt, leave it out50A Benefit of Showing CompositionDiscover and show composition because it has the following benefitsIt clarifies

34、the domain constraints regarding the eligible existence of the part independent of the whole. 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.51Composition in the NextG

35、en Domain Model52Time Intervals and Product PricesIssue of time intervals associated with information, 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 th

36、e sale was made, and the current price53Association Role NamesA role name identifies an end of an association and ideally describes the role played by objects in the association54Roles as Concepts versus Roles in Associations55Derived ElementsA derived element can be determined from othersAttributes

37、 and associations are the most common derived elements. When should derived elements be shown?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 Elements5757Derived 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 qualified asso

温馨提示

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

评论

0/150

提交评论