Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Use case modeling & analysis v 1 by JIGAR MAKHIJA 116 views
- Object Oriented Analysis & Design by vishykn 1796 views
- Use Case Analysis and Diagramming by Ornella Dunn 376 views
- 3 analysis and design overview by Châu Thanh Chương 1765 views
- Bab 6 use case diagram 2010 by donasiilmu 2302 views
- Book of Uml by Niit 3804 views

No Downloads

Total views

2,682

On SlideShare

0

From Embeds

0

Number of Embeds

4

Shares

0

Downloads

131

Comments

0

Likes

2

No embeds

No notes for slide

- 1. Use-Case Analysis
- 2. Topics <ul><li>Use-Case Analysis Overview </li></ul><ul><li>Use-Case Analysis Steps </li></ul><ul><ul><li>Supplement The Use-Case Description </li></ul></ul><ul><ul><li>Find Classes From Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Unify Analysis Classes </li></ul></ul><ul><li>Review </li></ul>
- 3. Objectives: Use-Case Analysis <ul><li>Identify the classes which perform a use-case flow of events </li></ul><ul><li>Distribute the use-case behavior to those classes, identifying responsibilities of the classes </li></ul><ul><li>Develop Use-Case Realizations that model the collaborations between instances of the identified classes </li></ul>
- 4. Use-Case Analysis Overview Supplementary Specifications Glossary Use-Case Model Use-Case Analysis Project Specific Guidelines Use-Case Realization Analysis Classes Analysis Model Software Architecture Document Use Case Analysis is performed By the Designer – once per Iteration per use case realization
- 5. Use-Case Analysis Steps <ul><li>Supplement the Use-Case Description </li></ul><ul><li>For each Use-Case Realization </li></ul><ul><ul><li>Find Classes from Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><li>For each resulting analysis class </li></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Qualify Analysis Mechanisms </li></ul></ul><ul><li>Unify Analysis Classes </li></ul><ul><li>Checkpoints </li></ul>
- 6. Use-Case Analysis Steps <ul><li>Supplement the Use-Case Description </li></ul><ul><li>For each Use-Case Realization </li></ul><ul><ul><li>Find Classes from Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><li>For each resulting analysis class </li></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Qualify Analysis Mechanisms </li></ul></ul><ul><li>Unify Analysis Classes </li></ul><ul><li>Checkpoints </li></ul>
- 7. Supplement the Use-Case Description
- 8. <ul><li>Supplement the Use-Case Description </li></ul><ul><li>For each Use-Case Realization </li></ul><ul><ul><li>Find Classes from Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><li>For each resulting analysis class </li></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Qualify Analysis Mechanisms </li></ul></ul><ul><li>Unify Analysis Classes </li></ul><ul><li>Checkpoints </li></ul>Use-Case Analysis Steps
- 9. Use-Case Realization Class Diagrams Sequence Diagrams Use Case Collaboration Diagrams Use-Case Model Design Model Use Case Use-Case Realization
- 10. Analysis Classes Use Cases Analysis Classes Source Code Exec Design Elements Use-Case Analysis A First Step Toward Executables
- 11. Find Classes from Use-Case Behavior <ul><li>The complete behavior of a use case has to be distributed to analysis classes </li></ul>
- 12. What Is an Analysis Class?
- 13. What Is a Boundary Class? <ul><li>Intermediates between the interface and something outside the system </li></ul><ul><li>Several Types </li></ul><ul><ul><li>User interface classes </li></ul></ul><ul><ul><li>System interface classes </li></ul></ul><ul><ul><li>Device interface classes </li></ul></ul><ul><li>One boundary class per actor/use-case pair </li></ul>Environment Independent
- 14. The Role of a Boundary Class Model interaction between the system and its environment Customer <<boundary>> <<boundary>> <<control>> <<boundary>> <<entity>> <<entity>> External Database
- 15. Example: Finding Boundary Classes <ul><li>One boundary class per actor/use case pair </li></ul>
- 16. Guidelines: Boundary Class <ul><li>User Interface Classes </li></ul><ul><ul><li>Concentrate on what information is presented to the user </li></ul></ul><ul><ul><li>Do NOT concentrate on the UI details </li></ul></ul><ul><li>System and Device Interface Classes </li></ul><ul><ul><li>Concentrate on what protocols must be defined </li></ul></ul><ul><ul><li>Do NOT concentrate on how the protocols will be implemented </li></ul></ul><ul><li>Concentrate on the responsibilities , not the details! </li></ul>
- 17. What Is an Entity Class? <ul><li>Key abstractions of the system </li></ul>Environment Independent
- 18. The Role of an Entity Class Store and manage information in the system
- 19. Example: Finding Entity Classes <ul><li>Use use-case flow of events as input </li></ul><ul><li>Key abstractions of the use case </li></ul><ul><li>Traditional, filtering nouns approach </li></ul><ul><ul><li>Underline noun clauses in the use-case flow of events </li></ul></ul><ul><ul><li>Remove redundant candidates </li></ul></ul><ul><ul><li>Remove vague candidates </li></ul></ul><ul><ul><li>Remove actors (out of scope) </li></ul></ul><ul><ul><li>Remove implementation constructs </li></ul></ul><ul><ul><li>Remove attributes (save for later) </li></ul></ul><ul><ul><li>Remove operations </li></ul></ul>
- 20. Example: Candidate Entity Classes <ul><li>Register for Courses (Create Schedule) </li></ul><ul><li>Hệ thống lấy danh sách học phần có mở trong học kỳ từ hệ thống Course Catalog System và thể hiện dưới dạng danh sách cho sinh viên chọn. </li></ul><ul><li>Sinh viên chọn 4 học phần bắt buộc và hai học phần tự chọn từ danh sách trên. </li></ul><ul><li>Sau khi sinh viên chọn, hệ thống tạo một lịch học chứa những học phần sinh viên đã đăng ký. </li></ul><ul><li>Sinh viên kiểm tra và xác nhận lịch học, Submit Schedule được thực thi. </li></ul>
- 21. What Is a Control Class? <ul><li>Use-case behavior coordinator </li></ul><ul><ul><li>More complex use cases generally require one or more control classes </li></ul></ul>Use-case dependent, Environment independent
- 22. The Role of a Control Class Coordinate the use-case behavior
- 23. Example: Finding Control Classes <ul><li>In general, identify one control class per use case. </li></ul><ul><ul><li>As analysis continues, a complex use case’s control class may evolve into more than one class </li></ul></ul>
- 24. Example: Summary: Analysis Classes Use-Case Model Design Model
- 25. <ul><li>Supplement the Use-Case Description </li></ul><ul><li>For each Use-Case Realization </li></ul><ul><ul><li>Find Classes from Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><li>For each resulting analysis class </li></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Qualify Analysis Mechanisms </li></ul></ul><ul><li>Unify Analysis Classes </li></ul><ul><li>Checkpoints </li></ul>Use-Case Analysis Steps
- 26. Distribute Use-Case Behavior to Classes <ul><li>For each use-case flow of events: </li></ul><ul><ul><li>Identify analysis classes </li></ul></ul><ul><ul><li>Allocate use-case responsibilities to analysis classes </li></ul></ul><ul><ul><li>Model analysis class interactions in Interaction diagrams </li></ul></ul>
- 27. Guidelines: Allocating Responsibilities to Classes <ul><li>Use analysis class stereotypes as a guide </li></ul><ul><li>Boundary Classes </li></ul><ul><ul><li>Behavior that involves communication with an actor </li></ul></ul><ul><li>Entity Classes </li></ul><ul><ul><li>Behavior that involves the data encapsulated within the abstraction </li></ul></ul><ul><li>Control Classes </li></ul><ul><ul><li>Behavior specific to a use case or part of a very important flow of events </li></ul></ul>
- 28. Allocating Responsibilities to Classes (cont.) <ul><li>Who has the data needed to perform the responsibility? </li></ul><ul><li>If one class has the data, put the responsibility with the data </li></ul><ul><li>If multiple classes have the data: </li></ul><ul><ul><li>Put the responsibility with one class and add a relationship to the other </li></ul></ul><ul><ul><li>Create a new class, put the responsibility in the new class, and add relationships to classes needed to perform the responsibility </li></ul></ul><ul><ul><li>Put the responsibility in the control class, and add relationships to classes needed to perform the responsibility </li></ul></ul>
- 29. Objects Collaborate <ul><li>Objects are useless unless they can collaborate to solve a problem. </li></ul><ul><ul><li>Each object is responsible for its own behavior and status. </li></ul></ul><ul><ul><li>No one object can carry out every responsibility on its own. </li></ul></ul><ul><li>How do objects interact with each other? </li></ul><ul><ul><li>They interact through messages. </li></ul></ul>
- 30. Objects Interact with Messages <ul><li>A message shows how one object asks another object to perform some activity. </li></ul>: Car buyer :RegistrationController :CourseCatalogSystem getCourseOfferings(forSemester) Message
- 31. Interaction Diagrams <ul><li>Generic term that applies to several diagrams that emphasize object interactions </li></ul><ul><li>Sequence Diagram </li></ul><ul><ul><li>Time oriented view of object interaction </li></ul></ul><ul><li>Communication Diagram (or Collaboration Diagram) </li></ul><ul><ul><li>Structural view of messaging objects </li></ul></ul>Communication Diagrams Sequence Diagrams
- 32. What Is a Sequence Diagram? <ul><li>A sequence diagram is an interaction diagram that emphasizes the time ordering of messages. </li></ul><ul><li>The diagram shows: </li></ul><ul><ul><li>The objects participating in the interaction. </li></ul></ul><ul><ul><li>The sequence of messages exchanged. </li></ul></ul>Sequence Diagram
- 33. Sequence Diagram Contents: Objects Anonymous Objects Lifelines Named Object :RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem
- 34. Sequence Diagram Contents: Actor :RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem : Student : Course Catalog Actor instances Actor instances
- 35. Sequence Diagram Contents: Messages Message Reflexive Messages 1: create schedule( ) 2: get course offerings( ) 3: get course offerings(for Semester) 4: get course offerings( ) :RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem : Student : Course Catalog 6: display blank schedule( ) 5: display course offerings( ) 1: create schedule( ) 4: get course offerings( )
- 36. Execution Occurrence (Focus of control) 1: create schedule( ) 2: get course offerings( ) 3: get course offerings(for Semester) 4: get course offerings( ) 6: display blank schedule( ) :RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem : Student : Course Catalog 5: display course offerings( ) Execution Occurrence
- 37. Event Occurrence Event Occurrence 1: create schedule( ) 2: get course offerings( ) 3: get course offerings(for Semester) 4: get course offerings( ) 6: display blank schedule( ) :RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem : Student : Course Catalog 5: display course offerings( )
- 38. Register for Courses Use Case – Basic flow: Create a Schedule <ul><li>The Student selects "create schedule." </li></ul><ul><li>The system retrieves a list of available course offerings from the Course Catalog System . </li></ul><ul><li>The system displays a blank schedule form. </li></ul><ul><li>The Student selects 4 primary course offerings and 2 alternate course offerings from the list of available offerings. Once the selections are complete the Student selects "submit." </li></ul><ul><li>H ệ thống tạo một lịch học chứa những học phần sinh viên đã đăng ký. </li></ul><ul><li>Sinh viên kiểm tra và xác nhận lịch học, Submit Schedule được thực thi. </li></ul>
- 39. Analysis Classes
- 40. Example: Sequence Diagram : Student : RegisterForCoursesForm : RegistrationController : Schedule : Student : Course Catalog : CourseCatalogSystem 1: // create schedule( ) 5: // display course offerings( ) 2: // get course offerings( ) 3: // get course offerings(forSemester) A list of the available course offerings for this semester are displayed Student wishes to create a new schedule 6: // display blank schedule( ) At this, point the Submit Schedule subflow is executed. Sequence Diagram: Register for Courses / Register for Courses - Basic Flow (Submit Schedule) 7: // select 4 primary and 2 alternate offerings( ) 8: // create schedule with offerings( ) A blank schedule is displayed for the students to select offerings 9: // create with offerings( ) 10: // add schedule(Schedule) 4: // get course offerings( )
- 41. <ul><li>Use case: Withdraw </li></ul><ul><li>Actor: Client </li></ul><ul><li>Brief: To allow the client to withdraw money </li></ul><ul><li>Pre-conditions: User already logged-in </li></ul><ul><li>Post-conditions: Amount is deducted from user’s account </li></ul><ul><li>Main flow: </li></ul><ul><ul><li>1) Client initiates this usecase by selecting 'withdraw' </li></ul></ul><ul><ul><li>2) System displays all the accounts related to the Card and prompts to select any one. </li></ul></ul><ul><ul><li>3) Client selects one account. </li></ul></ul><ul><ul><li>4) System prompts for the amount (fast cash or …) </li></ul></ul><ul><ul><li>5) Client enter amount </li></ul></ul><ul><ul><li>… </li></ul></ul><ul><li>Alternative flows: </li></ul><ul><ul><li>2) & 3) System selects the only one available account </li></ul></ul><ul><ul><li>… </li></ul></ul>Example: Use case Withdraw of ATM Client User Account Amount Money Card Cash Identify Nouns
- 42. Analysis Classes WithdrawUI WithdrawControl Card Account
- 43. Sequence Diagram – Use case Withdraw : Client : WithdrawUI : WithdrawControl : Card : Account 1: select withdraw 2: // get accounts(card) 3: // get accounts( ) 4: // display accounts( ) 5: select account 6: enter amount 7: // withdraw from(selected account, amount) 8: withdraw(amount )
- 44. Bài tập: Rent Video Use case: Basic flow <ul><li>Nhân viên dùng thiết bị quét thẻ thành viên của khách hàng. </li></ul><ul><li>Hệ thống kiểm tra băng đĩa video thuê quá hạn và mức độ đáng tin của khách hàng. </li></ul><ul><li>Nhân viên quét mã vạch của các video khách hàng muốn thuê. Số lượng băng đĩa khách hàng thuê phải nhỏ hơn 8. </li></ul><ul><li>Nhân viên nhập ngày thuê và hạn trả cho từng bản ghi thuê video. </li></ul><ul><li>Hệ thống tính toán và hiển thị lệ phí thuê video. </li></ul><ul><li>Sau khi khách hàng thanh toán, nhân viên in biên nhận thuê video và chọn chức năng Save </li></ul><ul><li>Hệ thống cập nhật các bản ghi thuê video. </li></ul>
- 45.
- 46. What Is a Communication Diagram? <ul><li>A communication diagram emphasizes the organization of the objects that participate in an interaction. </li></ul><ul><li>The communication diagram shows: </li></ul><ul><ul><li>The objects participating in the interaction. </li></ul></ul><ul><ul><li>Links between the objects. </li></ul></ul><ul><ul><li>Messages passed between the objects. </li></ul></ul>Communication Diagrams
- 47. Example: Communication Diagram : Student : RegisterForCoursesForm : RegistrationController : CourseCatalogSystem 5: display course offerings( ) 6: display blank schedule( ) : Course Catalog 1: create schedule( ) 2: get course offerings( ) 3: get course offerings(forSemester) 4: get course offerings( )
- 48. Communication Diagrams: Objects Objects : RegisterForCoursesForm : RegistrationController SWTSU Catalog : CourseCatalogSystem
- 49. Communication Diagram: Actors : Student : Course Catalog : RegisterForCoursesForm : RegistrationController SWTSU Catalog : CourseCatalogSystem Actors
- 50. Communication Diagram: Links and Messages : Student : RegisterForCoursesForm : RegistrationController : CourseCatalogSystem 5: display course offerings( ) 6: display blank schedule( ) : Course Catalog 1: create schedule( ) 2: get course offerings( ) 3: get course offerings(forSemester) 4: get course offerings( ) Links Messages
- 51. Example: Communication Diagram : Student : RegisterForCoursesForm : RegistrationController : Schedule : Student : CourseCatalogSystem 5: // display course offerings( ) 6: // display blank schedule( ) : Course Catalog 1: // create schedule( ) 7: // select 4 primary and 2 alternate offerings( ) 2: // get course offerings( ) 8: // create schedule with offerings( ) 9: // create with offerings( ) 3: // get course offerings(forSemester) 10: // add schedule(Schedule) 4: // get course offerings( )
- 52. One Interaction Diagram Is Not Good Enough
- 53. <ul><li>Semantically equivalent </li></ul><ul><ul><li>Can convert one diagram to the other without losing any information </li></ul></ul><ul><li>Model the dynamic aspects of a system </li></ul><ul><li>Model a use-case scenario </li></ul>Sequence and Communication Diagram Similarities
- 54. <ul><li>Communication Diagrams </li></ul><ul><ul><li>Show relationships in addition to interactions </li></ul></ul><ul><ul><li>Better for visualizing patterns of collaboration </li></ul></ul><ul><ul><li>Better for visualizing all of the effects on a given object </li></ul></ul><ul><ul><li>Easier to use for brainstorming sessions </li></ul></ul><ul><li>Sequence Diagrams </li></ul><ul><ul><li>Show the explicit sequence of messages </li></ul></ul><ul><ul><li>Better for visualizing overall flow </li></ul></ul><ul><ul><li>Better for real-time specifications and for complex scenarios </li></ul></ul>Communication vs. Sequence Diagrams
- 55. <ul><li>Supplement the Use-Case Description </li></ul><ul><li>For each Use-Case Realization </li></ul><ul><ul><li>Find Classes from Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><li>For each resulting analysis class </li></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Qualify Analysis Mechanisms </li></ul></ul><ul><li>Unify Analysis Classes </li></ul><ul><li>Checkpoints </li></ul>Use-Case Analysis Steps
- 56. Describe Responsibilities <ul><li>What are responsibilities? </li></ul><ul><li>How do I find them? </li></ul>Interaction Diagram Class Diagram // PerformResponsibility :Client :Supplier Supplier // PerformResponsibility
- 57. Example: View of Participating Classes (VOPC) Class Diagram RegisterForCoursesForm // submit schedule() // display course offerings() // update schedule() // delete schedule() // confirm schedule deletion() // request schedule delete confirmation() // display schedule() // register for courses() // display possible operations() // save schedule() // create schedule() // select 4 primary and 2 alternate offerings() // display blank schedule() // update offering selections() <<boundary>> CourseCatalogSystem // get course offerings() <<boundary>> RegistrationController // get course offerings() // get current schedule() // delete current schedule() // submit schedule() // is registration open?() // save schedule() // create schedule with offerings() // update schedule with new selections() <<control>> Student // get tuition() // add schedule() // get schedule() // delete schedule() // has pre-requisites() <<entity>> CourseOffering // add student() // remove student() // close registration() // get number of students() // cancel() // still open?() // add professor() // close() // save() <<entity>> Schedule // commit() // select alternate() // remove offering() // level() // cancel() // get cost() // delete() // submit() // save() // any conflicts?() // create with offerings() // update with new selections() <<entity>>
- 58. Maintaining Consistency: What to Look For <ul><li>In order of criticality </li></ul><ul><ul><li>Redundant responsibilities across classes </li></ul></ul><ul><ul><li>Disjoint responsibilities within classes </li></ul></ul><ul><ul><li>Class with one responsibility </li></ul></ul><ul><ul><li>Class with no responsibilities </li></ul></ul><ul><ul><li>Better distribution of behavior </li></ul></ul><ul><ul><li>Class that interacts with many other classes </li></ul></ul>
- 59. <ul><li>Supplement the Use-Case Description </li></ul><ul><li>For each Use-Case Realization </li></ul><ul><ul><li>Find Classes from Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><li>For each resulting analysis class </li></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Qualify Analysis Mechanisms </li></ul></ul><ul><li>Unify Analysis Classes </li></ul><ul><li>Checkpoints </li></ul>Use-Case Analysis Steps
- 60. Finding Attributes <ul><li>Properties/characteristics of identified classes </li></ul><ul><li>Information retained by identified classes </li></ul><ul><li>“ Nouns” that did not become classes </li></ul><ul><ul><li>Information whose value is the important thing </li></ul></ul><ul><ul><li>Information that is uniquely "owned” by an object </li></ul></ul><ul><ul><li>Information that has no behavior </li></ul></ul>
- 61. Finding Relationships Relationship for every link! Link Association Collaboration Diagram Class Diagram 0..* Prime suppliers 0..* Client Supplier PerformResponsibility() :Client :Supplier Client Supplier
- 62. Example: What Associations Can You Find? : CourseOffering : RegistrationController : Schedule : Student : PrimaryScheduleOfferingInfo 8: any conflicts?( ) : RegisterForCoursesForm 2: submit schedule( ) 4: submit( ) 3: save( ) 7: still open?( ) 9: add student(Schedule) 5: is selected?( ) 10: mark as enrolled in( ) 6: has pre-requisites(CourseOffering) 1: submit schedule( ) : Student
- 63. Example: VOPC: Finding Relationships RegisterForCoursesForm CourseOffering Schedule 0..4 0..* Student 0..* 1 RegistrationController 1 1 1 0..1 0..1 0..1 << entity >> <<entity>> <<entity>> <<control>> <<boundary>> primaryCourses currentSchedule
- 64. Refine Class Diagram <ul><li>Identify Components (Reusabile) </li></ul><ul><ul><li>Aggregation and Composition </li></ul></ul><ul><ul><li>Super-Sub classes </li></ul></ul>
- 65. Review: What Is Aggregation? <ul><li>A special form of association that models a whole-part relationship between an aggregate (the whole) and its parts </li></ul><ul><ul><li>“ is a part-of” relationship </li></ul></ul>
- 66. Association or Aggregation? <ul><li>If two objects are tightly bound by a whole-part relationship </li></ul><ul><ul><li>The relationship is an aggregation. </li></ul></ul><ul><li>If two objects are usually considered as independent, although they are often linked </li></ul><ul><ul><li>The relationship is an association. </li></ul></ul>When in doubt use association
- 67. Nhận diện Aggregation <ul><li>Bốn ngữ nghĩa có thể của Aggregation </li></ul><ul><li>Sở hữu độc quyền (Exclusive Owns) : Order has Order Line </li></ul><ul><ul><li>Có sự phụ thuộc tồn tại (không có Order Line nếu không có Order) </li></ul></ul><ul><ul><li>Không chia sẻ </li></ul></ul><ul><ul><li>Là thuộc tính cố định (một Order Line không thể chuyển sang Order khác) </li></ul></ul><ul><li>Sở hữu (Owns): Car has Tire </li></ul><ul><ul><li>Không chia sẻ </li></ul></ul><ul><ul><li>Không là thuộc tính cố định (có thể chuyển tire sang một car khác) </li></ul></ul><ul><li>Có (Has): Department has Student </li></ul><ul><ul><li>Không có sự phụ thuộc tồn tại, co thể chia sẻ. </li></ul></ul><ul><li>Thành viên (Member): Meeting has Chairperson </li></ul><ul><ul><li>Không có đặc trưng gì đặc biệt ngoại trừ là tư cách thành viên </li></ul></ul>
- 68. Composition and Aggregation <ul><li>Aggregation cơ bản là bất kỳ quan hệ whole–part </li></ul><ul><ul><li>Ngữ nghĩa có thể rất mơ hồ </li></ul></ul><ul><ul><li>Tương ứng với ngữ nghĩa "Has" và "Member". </li></ul></ul><ul><ul><li>Một đối tượng thành phần (part) có thể thuộc nhiều hơn một đối tượng bao gồm (whole) </li></ul></ul><ul><li>Composition là Aggregation mạnh hơn </li></ul><ul><ul><li>Tại một thời điểm, mỗi đối tượng thành phần (part) chỉ có thể thuộc chỉ một đối tượng bao gồm (whole) . </li></ul></ul><ul><ul><li>Có sự phụ thuộc tồn tại từ "part" vào "whole" </li></ul></ul><ul><ul><ul><li>Khi đối tượng "whole" bị hủy thì các "part" cũng bị hủy </li></ul></ul></ul><ul><ul><li>Tương ứng với ngữ nghĩa "ExclusiveOwns" và "Owns" </li></ul></ul>
- 69. Aggregation and Composition Quan hệ m*n có thể chấp nhận Quan hệ m*n không được phép Các Student có thể trong nhiều CourseOffering. Nếu CourseOffering bị hủy, các Student không bị hủy! Nếu Order bị xóa, các OrderLIne trong Order cũng bị xóa! Order OrderLine 1..* 1 1..* 1 Student CourseOffering 1..* 0..* 1..* 0..*
- 70. Review: What Is Generalization? <ul><li>A relationship among classes where one class shares the structure and/or behavior of one or more classes. </li></ul><ul><li>Defines a hierarchy of abstractions where a subclass inherits from one or more superclasses. </li></ul><ul><ul><li>Single inheritance </li></ul></ul><ul><ul><li>Multiple inheritance </li></ul></ul><ul><li>Is an “is a kind of” relationship. </li></ul>
- 71. Example: Single Inheritance <ul><li>One class inherits from another. </li></ul>Checking Savings Superclass (parent) Subclasses (children) Generalization Relationship Descendents Ancestor Account - balance - name - number + withdraw() + createStatement()
- 72. Example: Multiple Inheritance <ul><li>A class can inherit from several other classes. </li></ul>Use multiple inheritance only when needed and always with caution! FlyingThing Animal Horse Wolf Bird Helicopter Airplane Multiple Inheritance
- 73. <ul><li>Supplement the Use-Case Description </li></ul><ul><li>For each Use-Case Realization </li></ul><ul><ul><li>Find Classes from Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><li>For each resulting analysis class </li></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Qualify Analysis Mechanisms </li></ul></ul><ul><li>Unify Analysis Classes </li></ul><ul><li>Checkpoints </li></ul>Use-Case Analysis Steps
- 74. Review: Why Use Analysis Mechanisms? Analysis mechanisms are used during analysis to reduce the complexity of analysis, and to improve its consistency by providing designers with a shorthand representation for complex behavior.
- 75. Describing Analysis Mechanisms <ul><li>Collect all analysis mechanisms in a list </li></ul><ul><li>Draw a map of the client classes to the analysis mechanisms </li></ul><ul><li>Identify characteristics of the analysis mechanisms </li></ul>
- 76. Example: Describing Analysis Mechanisms <ul><li>Analysis class to analysis mechanism map </li></ul>Analysis Class Analysis Mechanism(s) Student Persistency, Security Schedule Persistency, Security CourseOffering Persistency, Legacy Interface Course Persistency, Legacy Interface RegistrationController Distribution
- 77. <ul><li>Analysis mechanism characteristics </li></ul><ul><li>Persistency for Schedule class: </li></ul><ul><ul><li>Granularity: 1 to 10 Kbytes per product </li></ul></ul><ul><ul><li>Volume: up to 2,000 schedules </li></ul></ul><ul><ul><li>Access frequency </li></ul></ul><ul><ul><ul><li>Create: 500 per day </li></ul></ul></ul><ul><ul><ul><li>Read: 2,000 access per hour </li></ul></ul></ul><ul><ul><ul><li>Update: 1,000 per day </li></ul></ul></ul><ul><ul><ul><li>Delete: 50 per day </li></ul></ul></ul><ul><ul><li>Other characteristics </li></ul></ul>Example: Describing Analysis Mechanisms
- 78. <ul><li>Supplement the Use-Case Description </li></ul><ul><li>For each Use-Case Realization </li></ul><ul><ul><li>Find Classes from Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><li>For each resulting analysis class </li></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Qualify Analysis Mechanisms </li></ul></ul><ul><li>Unify Analysis Classes </li></ul><ul><li>Checkpoints </li></ul>Use-Case Analysis Steps
- 79. Unify Analysis Classes
- 80. Evaluate Your Results
- 81. Use-Case Analysis Steps <ul><li>Supplement the Use-Case Description </li></ul><ul><li>For each Use-Case Realization </li></ul><ul><ul><li>Find Classes from Use-Case Behavior </li></ul></ul><ul><ul><li>Distribute Use-Case Behavior to Classes </li></ul></ul><ul><li>For each resulting analysis class </li></ul><ul><ul><li>Describe Responsibilities </li></ul></ul><ul><ul><li>Describe Attributes and Associations </li></ul></ul><ul><ul><li>Qualify Analysis Mechanisms </li></ul></ul><ul><li>Unify Analysis Classes </li></ul><ul><li>Checkpoints </li></ul>
- 82. <ul><li>Are the classes reasonable? </li></ul><ul><li>Does the name of each class clearly reflect the role it plays? </li></ul><ul><li>Does the class represent a single well-defined abstraction? </li></ul><ul><li>Are all attributes and responsibilities functionally coupled? </li></ul><ul><li>Does the class offer the required behavior? </li></ul><ul><li>Are all specific requirements on the class addressed? </li></ul>Checkpoints: Analysis Classes
- 83. <ul><li>Have all the main and/or sub-flows been handled, including exceptional cases? </li></ul><ul><li>Have all the required objects been found? </li></ul><ul><li>Has all behavior been unambiguously distributed to the participating objects? </li></ul><ul><li>Has behavior been distributed to the right objects? </li></ul><ul><li>Where there are several Interaction diagrams, are their relationships clear and consistent? </li></ul>Checkpoints: Use-Case Realizations
- 84. Review: Use-Case Analysis <ul><li>What is the purpose of Use-Case Analysis? </li></ul><ul><li>What is an analysis class? Name and describe the three analysis stereotypes. </li></ul><ul><li>What is a Use-Case Realization? </li></ul><ul><li>Describe some considerations when allocating responsibilities to analysis classes. </li></ul><ul><li>How many Interaction diagrams should be produced during Use-Case Analysis? </li></ul>
- 85. Exercise: Use-Case Analysis <ul><li>Given the following: </li></ul><ul><li>Use-Case Model, especially the use-case flows of events </li></ul><ul><li>Key abstractions/classes </li></ul><ul><li>The Supplementary Specification </li></ul><ul><li>The possible analysis mechanisms </li></ul>
- 86. Exercise: Use-Case Analysis (cont.) <ul><li>Identify the following for a particular use case: </li></ul><ul><li>The analysis classes, along with their: </li></ul><ul><ul><li>Brief descriptions </li></ul></ul><ul><ul><li>Stereotypes </li></ul></ul><ul><ul><li>Responsibilities </li></ul></ul><ul><li>The collaborations needed to implement the use case </li></ul><ul><li>Analysis class attributes and relationships </li></ul><ul><li>Analysis class analysis mechanisms </li></ul>
- 87. Exercise: Use-Case Analysis (cont.) <ul><li>Produce the following for a particular use case: </li></ul><ul><li>Use-Case Realization Interaction diagram for at least one of the usecase flows of events </li></ul><ul><li>VOPC class diagram, containing the analysis classes, their stereotypes, responsibilities, attributes, and relationships </li></ul><ul><li>Analysis class to analysis mechanism map </li></ul>
- 88. Exercise: Use-Case Analysis (cont.) <ul><li>Start with diagramming the basic flow and then do the other sub-flows if you have time. </li></ul><ul><li>The Interaction diagrams may be collaboration or Sequence diagrams. On an Interaction diagram, sending a message to an object means that you are allocating responsibility for performing that task to the object. </li></ul><ul><li>Be sure to use the “//” naming convention for responsibilities. </li></ul><ul><li>Refer to the following slides if needed: </li></ul><ul><ul><li>Review: What is a Use-Case Realization </li></ul></ul><ul><ul><li>Example: Sequence Diagram </li></ul></ul><ul><ul><li>Example: Collaboration Diagram </li></ul></ul><ul><ul><li>Example: VOPC Finding Relationship </li></ul></ul>

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment