




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Elaboration Iteration 1-OOACh8. Iteration 1BasicsCh9. Domain ModelsCh10.System Sequence DiagramsCh11. Operation Contracts1Chapter 8. Iteration 1BasicsObjectivesDefine the first iteration in the elaboration phase.Motivate the following chapters in this section.Describe key inception and elaboration p
2、hase concepts.2Iteration 1 Requirements and EmphasisCore OOA/D SkillsNextGen POSImplement a basic, key scenario of the Process Sale use case: entering items and receiving a cash paymentImplement a Start Up use case as necessary to support the initialization needs of the iterationNothing fancy or com
3、plex is handled, just a simple happy path scenario, and the design and implementation to support itThere is no collaboration with external services, such as a tax calculator or product databaseNo complex pricing rules are applied3In Iterative Development We Dont Implement All the Requirements at Onc
4、eSubsets of the complete requirements or use casesa simplified version of the complete Process Sale use case- one simple cash-only scenariokey understanding in iterative lifecycle methodsstart production-quality programming and testing for a subset of the requirementsstart that development before al
5、l the requirements analysis is complete4Incremental Development for the Same Use Case Across Iterations5Process: Inception and ElaborationWhat Happened in Inception?Inception is a short step to elaboration It determined basic feasibility, risk, and scope, to decide if the project is worth more serio
6、us investigation On to ElaborationElaboration is the initial series of iterationsthe core, risky software architecture is programmed and testedthe majority of requirements are discovered and stabilizedthe major risks are mitigated or retired6Rank requirements as:High (score high on all rankings; har
7、d to add late)Medium (affects security domain)Lowby: Risk (includes both technical complexity and other factors, such as uncertainty of effort and usability)Coverage (all major parts of the system are tackled in early iterations)Criticality (refers to functions the client considers of high business
8、value)Ranking is done before each iterationProcess: Planning the Next Iteration7Chapter 9. Domain ModelsObjectivesIdentify conceptual classes related to the current iterationCreate an initial domain modelModel appropriate attributes and associations81. What is a Domain Model?OO software system consi
9、sts of a group of software objects Where to find these objects for a specific software system? Domain model illustrates meaningful conceptual classes in the problem domain is a source of inspiration for design software objects gives a conceptual visualisation of the problem, it shows:domain objects
10、or conceptual classesassociations between conceptual classesattributes of conceptual classesIdentifying a rich set of conceptual classes is at the heart of OO analysis9A Domain Model Example10Sample UP artifact influence11A domain model does not represent software classesSoftware artifacts, such as
11、a window or a databaseResponsibilities or methodsDomain Models Are Not Models of Software Components 12Domain models are a stepping step to designFrom Analysis to Design13Given the current requirements under consideration:Find the conceptual classes.Draw them as classes in a UML class diagram.Add as
12、sociations and attributes.2. How to create a Domain Model?14Three main strategiesReuse or modify existing models! (do this as much as possible! Analysis Pattern)Think hard and use a category listIdentify noun phrases in requirementsAll 3 strategies should be used initially even if that leads to much
13、 overlappingit should not take too long anywaybest way to arrive at a rich set of conceptual classesHow to Find Conceptual Classes?15 Using a Category ListConceptual Class CategoryExamplesbusiness transactionsGuideline: These are critical (they involve money), so start with transactions.Sale, Paymen
14、tReservationtransaction line itemsGuideline: Transactions often come with related line items, so consider these next.SalesLineItemproduct or service related to a transaction or transaction line itemGuideline: Transactions are for something (a product or service).ItemFlight, Seat, Mealwhere is the tr
15、ansaction recorded?Guideline: Important.Register, Ledgerroles of people or organizations related to the transaction; actors in the use caseGuideline: We usually need to know about the parties involved in a transaction.Cashier, Customer, Store MonopolyPlayer Passenger, Airline16Conceptual Class Categ
16、oryExamplesplace of transaction; place of serviceStoreAirport, Plane, Seatnoteworthy events, often with a time or place we need to rememberSale, Payment MonopolyGame Flightphysical objectsGuideline: This is especially relevant when creating device-control software, or simulations.Item, Register Boar
17、d, Piece, Die Airplanedescriptions of thingsProductDescriptionFlightDescriptioncatalogsGuideline: Descriptions are often in a catalog.ProductCatalogFlightCatalogcontainers of things (physical or information)Store, Bin Board Airplanethings in a containerItem Square (in a Board) Passengerother collabo
18、rating systemsCreditAuthorizationSystemAirTrafficControlContinued 17Conceptual Class CategoryExamplesrecords of finance, work, contracts, legal mattersReceipt, LedgerMaintenanceLogfinancial instrumentsCash, Check, LineOfCreditTicketCreditschedules, manuals, documents that are regularly referred to i
19、n order to perform workDailyPriceChangeListRepairScheduleContinued 18Linguistic analysis Requirements must be read very closely (especially fully-dressed use cases) and nouns or sequences of nouns identified:This yields candidate conceptual classes.Natural language is imprecise and ambiguous, so you
20、 need to use judgmentExample from the Process Sale fully dressed use case (see previous separate document): note that we restrict ourselves to current requirements (e.g. cash payment only)Using a Noun Phrases Identification19Main Success Scenario (or Basic Flow):1.Customer arrives at POS checkout wi
21、th goods and/or services to purchase.2.Cashier starts a new sale.3.Cashier enters item identifier.4.System records sale line item and presents item description, price, and running total. Price calculated from a set of price rules.Cashier repeats steps 3-4 until indicates done.5.System presents total
22、 with taxes calculated.6.Cashier tells Customer the total, and asks for payment.7.Customer pays and System handles payment.8.System logs completed sale and sends sale and payment information to the external Accounting system (for accounting and commissions) and Inventory system (to update inventory)
23、.9.System presents receipt10.Customer leaves with receipt and goods (if any).20Extensions (or Alternative Flows): 7a. Paying by cash:Cashier enters the cash amount tendered.System presents the balance due, and releases the cash drawer.Cashier deposits cash tendered and returns balance in cash to Cus
24、tomer.System records the cash payment Using these approaches we end up with candidate conceptual classes:Some will be outside the current requirements (e.g. price rules);Some will be redundant (e.g. goods is better described by item);Some will be attributes of concepts rather than concepts themselve
25、s (e.g. price);21There is no correct list of conceptual classes! Initial POS Domain ModelPOS Conceptual Classes22 1) should Receipt be a conceptual class?A receipt is certainly noteworthy (allows refunds):FORAll the information (? Sure ? E.g. receipt number; or should that be Sale number?) on the re
26、ceipt is however derived from other conceptual classes (from Sale) : AGAINST;Returns are not being considering in this iteration : AGAINST;So we wont include it now: it may be needed when considering the Handle Returns use case (Make a note to that effect)23Representing something as an attribute whe
27、n it should be a conceptGuideline: if something is not a number or a string then it is probably a conceptual class, not an attribute.StorephoneNumberSaleSalestoreOr 2) A Common mistake in a domain modelAirportnameFlightFlightdestinationOr 24Think about description classes when creating an initial li
28、st of conceptual classes (or during refactoring):A description class contains information that describes something else 3) When to Model with Description Classes 25Add a description class (for example, ProductDescription) when:There needs to be a description about an item or service, independent of
29、the current existence of any examples of those items or services.Deleting instances of things they describe (for example, Item) results in a loss of information that needs to be maintained, but was incorrectly associated with the deleted thing.It reduces redundant or duplicated information.26Another
30、 example:Descriptions in the Airline Domain27Some conceptual classes will be missed at this stage : aim at a good initial domain, not perfection.Use terminology (e.g. names of concepts, descriptions of use cases) that make sense in the application context.We can also model un-real world problems: E.
31、g. in a telecommunication domain: Message, Connection, Port, Dialog, Route, Protocol would be candidate conceptual classes.Discussion283. AssociationsAn association is a relationship between classes that indicate some meaningful and interesting relationshipCriteria for Useful Associations Associatio
32、ns for which knowledge of the relationship needs to be preserved for some duration (“need-to-know” association) SalesLineItem instances are associated with a Sale ?a Cashier has looked-up a particular ProductDescription ?Associations derived from the Common Association List29The UML Association Nota
33、tion30Based on a ClassName-VerbPhrase-ClassName format where the verb phrase creates a sequence that is readable and meaningful.Naming Associations31Each end of an association is called a role. Roles may optionally have:multiplicity expressionname (to clarify meaning)navigability (not relevant durin
34、g OOA)The multiplicity defines how many instances of a class A can be associated with one instance of a class B3233The multiplicity value communicates how many instances can be validly associated with another, at a particular moment, rather than over a span of timeA Car Stocked-by one DealerAdding m
35、ultiplicity values to the roles of an association helps exploring the problem domain.Two classes may have multiple associations between them in a UML class diagram; this is not uncommon:34Two main ways:what need to know associations are necessary given our current list of candidate concepts?Using a
36、list of association categories.Association CategoryExamplesA is a transaction related to another transaction BCashPayment-SaleCancellation-ReservationA is a line item of a transaction BSalesLineItem-SaleA is a product or service for a transaction (or line item) BItem-SalesLineItemFlight-ReservationA
37、 is a role related to a transaction BCustomer-PaymentPassenger-TicketA is a physical or logical part of BDrawer-RegisterSquare-BoardSeat-Airplane35How to Find Associations?Continued Association CategoryExamplesA is physically or logically contained in/on BRegister-StoreItem-ShelfSquare-BoardPassenge
38、r-AirplaneA is a description for BProductDescription-ItemFlightDescription-FlightA is known/logged/recorded/reported/captured in BSale-RegisterPiece-SquareA is a member of BCashier-StorePlayer-MonopolyGamePilot-AirlineA is an organizational subunit of BDepartmentStoreMaintenanceAirline36Continued As
39、sociation CategoryExamplesA uses or manages or owns BCashier-RegisterPlayer-PiecePilot-AirplaneA is next to BSalesLineItem-SalesLineItemSquare-SquareCity-City37Partial POS Domain Model384. AttributesAn attribute is a logical data values of an objectInclude attributes that the requirements (for examp
40、le, use cases) suggest or imply a need to remember information For example, a receipt (which reports the information of a salenormally includes a date and time, the store name and address, and the cashier ID, among many other things. Therefore,Sale needs a dateTime attribute.Store needs a name and a
41、ddress.Cashier needs an ID.39The full syntax :visibility name : type multiplicity = default property-stringreadOnly is probably the most common property string for attributes. Private visibility (-) is usually implicit.Attribute multiplicity can be used to indicate the optional presence of a value,
42、or the number of objects that can fill a (collection) attribute.40UML Attribute Notation Derived Attributes An attribute that can be derived by other information.41What are Suitable Attribute in the Domain ModelFocus on Data Type Attribute in the Domain Model The attributes should be “primitive” dat
43、a types Ex. Numbers, Booleans, Date, String, Time, Character, The attributes, normally, should not be a complex domain concept Ex. Sale, Airport A common mistake is modeling a complex domain concept as an attribute 4243When to Define New Data Type ClassesRepresent what may initially be considered a
44、number or string as a new data type class in the domain model if:It is composed of separate sections.phone number, name of personThere are operations associated with it, such as parsing or validation.social security numberIt has other motional price could have a start (effective) date
45、and end dateIt is a quantity with a unit.payment amount has a unit of currencyIt is an abstraction of one or more types with some of these qualities.item identifier in the sales domain is a generalization of types such as Universal Product Code (UPC) and European Article Number (EAN)44Where to Illus
46、trate These Data Type Classes?Since ItemID is a data type, it can be shown in the attribute compartment of the class box If ItemID is a new type with its own attributes and associations, it can be shown as a conceptual class in its own box It depends what you want to emphasize in the diagram 45No At
47、tributes Representing Foreign KeysAttributes should not be used to relate conceptual classes in the domain model. The most common violation of this principle is to add a kind of foreign key attribute46Modeling Attribute Quantities and Units 47Attributes in the Domain Models48NextGen POS Domain Model
48、 (with attributes) 49In iterative development, we incrementally evolve a domain model over several iterations.In each, the domain model is limited to the prior and current scenarios under consideration, rather than expanding to a big bang waterfall-style model that early on attempts to capture all p
49、ossible conceptual classes and relationships. For example, this POS iteration is limited to a simplified cash-only Process Sale scenario; therefore, a partial domain model will be created to reflect just that not more. 5. Process: Iterative and Evolutionary Domain Modelling50Domain modeling is a ver
50、y important activity in OOA. We must ensure that the model built will be able to withstand the information requirements of the current iteration.In addition, the model will grow in subsequent iterations are more requirements are examined.Identifying a rich set of conceptual classes is at the heart o
51、f OO analysisDomain Modeling is often called Business Modeling; and is both started and completed in the elaboration phase.Conclusions51Chapter 10. System Sequence DiagramsObjectivesIdentify system eventsCreate system sequence diagrams for use case scenarios5253System Sequence Diagram (SSD)The OOAD
52、challengeUCs are functional but System is OOThis is a modeling paradigm mismatchHow to make the functional-OO transitionWithout losing any reqsBeing able to demonstrate no reqs are lostEnd up with a correct, robust & flexible OO systemUltimately, every req must be an assigned responsibility for some
53、 object!5455SSDsSSDs are one of the books best ideasSSD is the key model thatLinks UCs with OO models (e.g., class & sequence)Supported by operation contracts (next chp)Establishes traceability of reqs into OO models5656SSDsA UC specifies function-alityA UC scenario is a time-ordered series of funct
54、ion calls that Actor invokes on SystemLarman calls them system operations or system eventsKey tasks areIdentify the functions in a UC scenarioTranslate them into UML function syntaxDraw a sequence diagram (easy part)Easier if you have simple, complete UCsSystem Sequence Diagram (SSD) Illustrate inpu
55、t and output events related to the system under discussion The use case text and its implied system events are input to SSD creation SSD is used to describe a particular scenario of a use case main success scenario frequent or complex alternative scenario For each system events, there is a system op
56、eration (1 to 1) The SSD operations can be analyzed in the operation contracts Detailed in the Glossary Serve as the starting point for designing collaboration objects 57SSD for a Process Sale Scenario58SSDs are derived from use cases; they show one scenario5960Process Sale UCUC: Process Sale makeNe
57、wSale()User selects new sale option (Request-invocation)System requests item identifier(Response-return) enterItem(itemID, quantity)User enters item identifier & quantitySystem records sale of item, and System displays item description, price, current totalSteps 2-5 repeated until user finished endS
58、ale()6.User selects sale finished optionSystem displays total and taxes due makePayment(amount)User enters payment informationSystem handles payment recordSale()System logs completed sale and sends sale information to Accounting System and Inventory SystemSystem generates receiptChoose event and ope
59、ration names at an abstract level61Process: Iterative and Evolutionary SSDsDont create SSDs for all scenarios, draw them only for the scenarios chosen for the next iterationSSDs are part of the Use-Case, not explicitly mentioned in the original UP Most SSDs are created during elaboration, when it is
60、 useful to identify the details of the system events to clarify what major operations the system must be designed to handle, write system operation contracts, and possibly to support estimation62Chapter 11. Operation ContractsObjectivesDefine system operations.Create contracts for system operations6
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 长沙环境保护职业技术学院《分子生物学与植保生物技术实验》2023-2024学年第二学期期末试卷
- 伊春职业学院《商务英语阅读Ⅱ》2023-2024学年第二学期期末试卷
- 扬州市邗江区2025届小升初数学预习模拟卷含解析
- 潍坊科技学院《机械制图》2023-2024学年第二学期期末试卷
- 沈阳科技学院《水产品加工与贮藏》2023-2024学年第一学期期末试卷
- 上海出版印刷高等专科学校《新媒体产品设计与管理》2023-2024学年第二学期期末试卷
- 昆玉职业技术学院《信息专业英语》2023-2024学年第二学期期末试卷
- 新疆工程学院《移动应用开发》2023-2024学年第二学期期末试卷
- 华中农业大学《武术表演》2023-2024学年第一学期期末试卷
- 长沙文创艺术职业学院《建筑工程事故的诊断与分析》2023-2024学年第二学期期末试卷
- 语文-湖南省长郡二十校联盟2025届新高考教学教研联盟高三第一次联考(长郡二十校一联)试题和答案
- 个人用电协议合同范例
- 建筑工程再生能源规划
- 《自动化控制系统培训课件》
- 多元函数概述
- 厨师用电安全培训
- 《陆上风电场工程变形测量技术规程》
- 派出所民警进校园安全教育
- 骨折病人的情志护理
- 三农投资方向研究报告及手册
- 《瑶族服饰特点》课件
评论
0/150
提交评论