ISOM221+Lecture+16+-+Interaction+Diagrams+I - Agenda...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Agenda ISOM221 Information Systems Analysis and Design Lecture 16: Interaction Diagrams I (Sequence Diagram) • Understand the relationship between the behavioral models and the structural and functional models • Understand the rules and style guidelines for sequence diagram • Understand the processes used to create sequence diagram 1 2 Some Updates on Last Class STUDENT - STU_StudentID - STU_LastName - STU_FirstName - STU_Username - STU_Password - STU_Address - STU_Phone - STU_Email + Register() Register() + Login() has 1 0..10 SHORTLISTING_RECORD - SR_ShortlistingID - SR_ShortlistingDate - SR_Status + Add () + Delete() + Update_Status() 0..* is included in Structural vs. Behavioral Models • Systems have static & dynamic characteristics – Structural models describe the static aspects of the system (Class diagram in Lecture 15) – Behavioral models describe the dynamics and interactions of of the system and its components OWNER - OWN_OwnerID - OWN_LastName - OWN_FirstName - OWN_Username - OWN_Password - OWN_Address - OWN_Phone - OWN_Email + Insert() + Read_Contact() Access to contact information in the OWNER class must be allowed in order to generate the search results by “Show_Matched_Results()” in the APARTMENT class has 1 0..* 1 APARTMENT - APT_ApartmentID - APT_Address - APT_Size - APT_Bedroom - APT_Rent - APT_PostingDate + Insert() + Delete() + Match_Search_Criteria() + Show_Matched_Results() • Behavioral models describe – The internal dynamic aspects of an information system that supports business processes in an organization – The interaction between the classes (objects) in the structural models to support the use cases in a timeordered manner 3 4 Why Do We Care About Class Behaviors? • Class diagram is static – It tells you “what” should happen, not “how” it occurs – Need to get a more dynamic view of the classes in order to be able to code the system Approaches for Modeling Class Behaviors • Models class behavior—illustrate the interactions between classes (objects) in a use case – Sequence diagram (Today) • Behavioral Models are dynamic – Show how classes/objects collaborate to support each use case – Depict the internal view of the business process – Show the effects of various processes on the system 5 • Models the changes in the status of the underlying object – Behavioral state machine diagram (Next lecture) 6 Interaction Diagram Components • Objects – An instantiation of a class Sequence Diagrams • Capture the behavior of a single use case – Illustrate the objects that participate in a use case – Show the sequence of messages that pass between between objects for a particular use case • Operations (Methods) – Behaviors of an instance of a class • Messages – Information sent to objects to tell them to execute one of their behaviors • Usually show a single scenario within the use case • Must be consistent with the underlying class diagram 8 7 Steps to Build Sequence Diagrams 1. Select one use case scenario – – E.g., “Making a new appointment for an existing patient” for the Make Appointment use case There can be another scenario in the same use case, e.g., “Making a new appointment for a new patient” E.g., Actor: Patient, Receptionist Class: Patient, Appointment, Unpaid Bills An “X” is placed at the end of the lifeline for a temporary object, e.g., shopping cart in an online purchase scenario We will skip “focus of control” to simplify our drawing Send information from one actor/object to another A message can be either in the form of information or method • No parentheses “()” for the labels of information • Look for methods relevant to the use case scenario 9 Sequence Diagram Syntax 2. Identify actors and classes (objects) involved in the scenario – – – – – – 3. Place lifeline and focus of control 4. Add messages 10 The request is made via the system Sample Sequence Diagram Example: Customer Buys Tune Scenario A message sent directly to an object denotes that that an object is created by another object [Condition] that must be met for the message to be sent 11 12 Exercise #1 • Create a sequence diagram for the following scenario: • A Real Estate, Inc. (AREI), sells house. Some buyers seek AREI’s advice in finding a house that meets their needs. The buyer first completes a buyer information form and passes it to the agent. The agent then enters buyer information into a buyer database and searches the database for houses that meet the buyer’s needs. The search results are printed and passed to the buyer (assuming results are available in this case). • Hint: Make up reasonable names for the methods 13 What are the Actors and Classes? 14 Sequence Diagram Exercise #2 • Create a sequence diagram for the use cases of the campus housing system – Refer to slide #3 for the class diagram 15 16 Use Case ID Use Case Actors Description UC-100 Search for Apartments (P) Student The student logs into the campus housing system with preregistered username and password. The student makes a selection from the available choices to search for apartment. Once in the search screen, the student is prompted to enter the desired location, number of bedrooms, and price range. The system will check for availability of apartments that match the student’s criteria. Provided that matched apartments are found, the system provides a listing of matched apartments and the contact information of the apartment owner. The student reviews the results and may add the apartment(s) to his/her shortlisting record with the date specified (the student can shortlist up to 10 apartments). / / / / 17 Sequence Diagram: Search for Apartments (with Matched Results) Priority Non-Functional Requirements Assumptions Source 18 Sequence Diagram: Add Apartments Use Case ID Use Case Actors Description UC-200 Add Apartments (P) Owner (S) Service Staff The apartment owner requests a form to list an apartment for rent. The service staff provides the form to the owner. The owner fills in the form, providing his/her contact information and information about the location, number of bedrooms, and monthly rent of the apartment. The service staff adds the apartment (with the posting date) to the database. Priority Non-Functional Requirements Assumptions Source / / / / 19 20 Sequence Diagram: Delete Apartments Use Case ID Use Case Actors Description UC-300 Delete Apartments (P) Owner (S) Service Staff The apartment owner calls the service staff to delete his/her listing when the apartment has been rented. The service staff then verifies the contact information of the owner and deletes the apartment from the database accordingly. If the apartment has been shortlisted by any student, the corresponding entry in the shortlisting record will be marked as “expired”. Priority Non-Functional Requirements Assumptions Source / / / / 21 22 Summary • After today’s class, you should – Be able to create sequence diagrams based on use cases and class diagrams Next Class • Interaction Diagrams II (Behavioral State Machine Diagram) • Reading: – Textbook Ch. 7 23 24 ...
View Full Document

Ask a homework question - tutors are online