Object Oriented System Design COS 50-3

Slides:



Advertisements
Similar presentations
DISTRIBUTED COMPUTING PARADIGMS
Advertisements

ANALYSIS MODEL. Analysis Model Actual system development start with this. Aims to structure the system independently of the actual implementation environment.
Context Diagram Yong Choi BPA CSUB.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Lecture 9 Descriptors, Events & Event Tables INFO1409 Systems Analysis & Design Module HND Year /9.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Interaction Diagrams Activity Diagram State Machine Diagram
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Lecture 5a: Sequence Interaction Diagrams CSE 111 Copyright W. Howden1.
Slide 6C.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Copyright W. Howden1 Lecture 4: Sequence Interaction Diagrams.
Application architectures
Sequence Diagrams By Zvika Gutterman Adam Carmi. Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control Information Examples.
Slide 7B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Blaha and Rumbaugh Sections 7.2 and 8.2
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
Application architectures
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Data Flow Diagrams.
1 CSC 450 Slides adapted from slides created by Robert B. France UML Behavioral Models.
Interaction diagrams Sequence and collaboration diagrams.
Introduction to Sequence Diagrams
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25. Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations.
DISTRIBUTED COMPUTING PARADIGMS. Paradigm? A MODEL 2for notes
Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
Object Oriented Analysis and Design Sequence Diagrams.
1 Chapter 5 Modeling System Requirements Finding the Use Cases Page
G045 Lecture 08 DFD Level 1 Diagrams (Data Flow Diagrams Level 1)
UML Diagrams CSC 422 Kutztown University Dr. Daniel Spiegel.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Information Systems Engineering Activity Diagram 1.
1 SEQUENCE DIAGRAM EXAMPLE The domain model, showing the navigability of the associations, and the Reserve video (staff scenario) use-case description.
Application architectures 1. Topics covered In the previous chapter, the discussion of system arcitectures focused on architectural issues such as control,
Sequence Diagrams CECS 343 Mimi Opkins.
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
Interaction View.
Dynamic Modeling of Banking System Case Study - I
Object-Oriented Static Modeling of the Banking System - I
Object-Oriented Systems Analysis and Design Using UML
Data Flow Diagrams.
COS50-3 OOSD INTRODUCTION TO OOSD (Week 1) November 7, 2018
Sequence Diagrams.
SE-565 Software System Requirements IV. Use Cases
Princess Nourah bint Abdulrahman University
Object Oriented Analysis and Design
Object Oriented Design Model
Princess Nourah bint Abdulrahman University
Object Oriented System Design
Object Oriented Software Development CIS 50-3
IMAT5205 Systems Analysis and Design
Lecture 4: Sequence Interaction Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Software Design (SE321) Lect6-Collaboration Diagram
Object Oriented System Design Class Diagrams
Information Systems Engineering
Object Oriented System Design Responsibilities
Presentation transcript:

Object Oriented System Design COS 50-3 Marc Conrad D104 (Park Square Building) Marc.Conrad@luton.ac.uk Acknowledgement: slides on this week’s lecture mostly provided by Dayou Li. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Sequence Diagram A sequence diagram shows how blocks (objects) within a use case cooperate with each other. It shows the occurrence of a sequence of events as the responses to stimuli, which is called stimuli-responses relationship or the internal logic of a system. A stimulus comes from a block and goes to another block. It triggers a sequence of events in that block. The receiver may also send “results” (feedback) back to the sender. Events must be known before constructing a sequence diagram. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Sequence Diagram (Cont’d) Events 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Sequence Diagram Sequence diagram shows how blocks (objects) within a used case cooperate with each other. It shows the occurrence of a sequence of events as the responses to stimuli, which is called stimuli-responses relationship or the internal logic of a system. A stimulus comes from a block and goes to another block. It triggers a sequence of events in that block. The receiver may also send “results” (feedback) back to the sender. Events must be known before constructing a sequence diagram. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Sequence Diagram (Cont’d) Syntax and Semantics signal (interprocess) Block’s life line (showing life cycle) message (intra-process) Distinguishing a system and the outside world (RationalRose: Use Actors ) Events occurring within a block feedback signal 07/11/2018 15:01:08 Marc Conrad - University of Luton

Sequence Diagram (Cont’d) Pragmatics: List all blocks right-hand side of the system border, Draw a life line for each block, List all events on the left-hand side of the system border, Draw vertical bars on the corresponding life lines to represent the events. Identify and draw signals, Identify and draw messages, Identify and draw feedback signals. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Sequence Diagram (Cont’d) Example: (focusing on Returning item use case) Blocks: -- Customer Panel, -- Deposit item receiver, -- Receipt basis, -- Deposit item, -- Receipt printer. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Sequence Diagram (Cont’d) Events (when a customer insert an item): If (customer is new) { Create a new account; } Do If (returned item is acceptable == true) Classify; Increment items; Increment values; else reject; 07/11/2018 15:01:08 Marc Conrad - University of Luton

Sequence Diagram (Cont’d) Events (when the customer presses receipt button): Print Logo and date; for (index = 0; index < 3; index ++) { Find name and number for a type of item; Find deposit value for a type of item; Sum; Print sum; } Ready for the next customer; 07/11/2018 15:01:08 Marc Conrad - University of Luton

Sequence Diagram (Cont’d) System border Customer panel Dep item receiver Receipt basis Dep item Rec. printer start create A new customer press start button ready new item Do { check classify Increment items, Increment values, } While (! receipt button pressed); Item items inc item/value 07/11/2018 15:01:08 Marc Conrad - University of Luton

Sequence Diagram (Cont’d) System border Customer panel Dep item receiver Receipt basis Dep item Rec.t printer receipt The customer presses the receipt button printReceipt print Logo, date Print Logo and date, Find name and number for a type of item, Find deposit value for a type of item, Sum, Print sum get value value get name name print 07/11/2018 15:01:08 Marc Conrad - University of Luton

Sequence Diagram (Cont’d) System border Customer panel Dep item receiver Receipt basis Dep item Rec. printer receipt The customer presses the receipt button printReceipt print Logo, date Print Logo and date, Find name and number for a type of item, Find deposit value for a type of item, Sum, Print sum sum get value value get name name printSum 07/11/2018 15:01:08 Marc Conrad - University of Luton

Rational Rose – Sequence Diagram 07/11/2018 15:01:08 Marc Conrad - University of Luton

Rational Rose – Collaboration Diagram 07/11/2018 15:01:08 Marc Conrad - University of Luton

(Vehicle Hire Company) Case Study (Vehicle Hire Company) EuroStar is a vehicle hire company. It provides a variety of vehicles for its customers. Each vehicle has a record in the company’s database, including Register Number, Maker, Model, Colour, Engine Size, etc. The company has a manager and a number of Register Staff. The register staff takes a customer’s reservation and searches for a vehicle that matches the order by sending a query to the company’s computerised database. When the requested type of vehicle is available, the staff confirms the reservation. If it is not available, the staff gives suggestions of alternative vehicle. 07/11/2018 15:01:08 Marc Conrad - University of Luton

(Vehicle Hire Company) Case Study (Vehicle Hire Company) Customers are required to return vehicles to the company before a Return Time. They are liable to a fine if they return vehicles late. EuroStar now wants to have a Web site in order that customers can make their reservation through the Internet. Suppose that you are working in a software house and EuroStar is your client. You are asked to develop such an on-line booking system for the company. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Requirement Model (use case) -- customers -- making a reservation 07/11/2018 15:01:08 Marc Conrad - University of Luton

Analysis Model (3-type objects) Console -- interface between the system and the user, an interface object. Database -- vehicle records and availability, an entity object. Register -- Control of data flow, a control object. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Design Model (sequence diagram) Console Register Database Events: read customer’s request, form a query, search for a vehicle, find alternative if the request vehicle is unavailable, display alternative vehicle, set return time, display return time. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Design Model (sequence diagram) Console Register Database Do read customer’s request, form a query, search for a vehicle, if unavailable find alternative display alternative, else set return time, display return time; While submit a request 07/11/2018 15:01:08 Marc Conrad - University of Luton

Object Oriented Design Model II (Week 5) COS50-3 OOSD Object Oriented Design Model II (Week 5) 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Selection in SD If… else… Fork and condition repression. Branch of control in the receiving block’s lifeline. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Selection in SD (Cont’d) A soda machine example: Customers buy soda drinks from a soda machine. Register Front Dispenser 07/11/2018 15:01:08 Marc Conrad - University of Luton

Selection in SD (Cont’d) When input (inserted coins ) = price System border Front Register Dispenser Insert Select Send Send Delivery 07/11/2018 15:01:08 Marc Conrad - University of Luton

Selection in SD (Cont’d) When input (inserted coins ) > price System border Front Register Dispenser Insert Select Send Delivery Send (input = price) Check for change (input > price) Return change Send (input > price) Delivery 07/11/2018 15:01:08 Marc Conrad - University of Luton

Selection in SD (Cont’d) Selection requires a second life line. One condition leads to the original life line and the other condition leads to the second one. Front Register Dispenser Original life line Second life line Delivery Send (input = price) Check for change (input > price) Return change Send (input > price) 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Control in SD Synchronous and asynchronous A synchronous message/signal is a control which has to wait for an answer before continuing. Hence, the sender passes the control to the receiver and cannot do anything until the receiver sends the control back. An asynchronous message is a control which does not need to wait before continuing. Hence, the sender actually does not pass the control to the receiver. The sender and the receiver carry on their work concurrently. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Control in SD (Cont’d) Syntax: Example: the “return item” use case in the recycling machine. -- Concentrate on the rounded rectangle and answer the question: “Should getName and getValue be synchronous or asynchronous? synchronous asynchronous 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Control in SD (Cont’d) System border Customer panel Dep item receiver Receipt basis Dep item Receipt printer receipt The customer presses the receipt button printReceipt print Logo, date Print Logo and date, Find name and number for a type of item, Find deposit value for a type of item, Sum, Print sum get value value get name name print 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Control in SD (Cont’d) On one hand, getValue signal and getName signal can be asynchronous as the system does not need to wait for values before requesting name. On the other hand, “print” message could be sent out to the printer if getValue and getName were asynchronous. For this reason, getValue signal and getName signal must be synchronous. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Control in SD (Cont’d) System border Customer panel Dep item receiver Receipt basis Dep item Receipt printer receipt The customer presses the receipt button printReceipt print Logo, date Print Logo and date, Find name and number for a type of item, Find deposit value for a type of item, Sum, Print sum get value value get name name print 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Control in SD (Cont’d) Concentrate on other signals and messages. -- receipt signal: it does not even need a feedback. Therefore, it can asynchronous. -- printReceipt signal: it can be asynchronous, too. -- printLogo, date message: it can also be asynchronous, as no feedback is required. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Control in SD (Cont’d) System border Customer panel Dep item receiver Receipt basis Dep item Receipt printer receipt The customer presses the receipt button printReceipt print Logo, date Print Logo and date, Find name and number for a type of item, Find deposit value for a type of item, Sum, Print sum get value value get name name print 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Recursion in SD Recursion or self-call -- an object/block may have an operation that invokes itself. Example (personal loan): Operation that invokes itself Year(0): loan(0); Year(1): loan(1) = loan(0)  (1 + interestRate); Year(2): loan(2) = loan(1)  (1 + interestRate) = [loan(0)  (1 + interestRate)]  (1 + interestRate); Year(3): loan(3) = loan(2)  (1 + interestRate) = [loan(1)  (1 + interestRate)]  (1 + interestRate); ={[loan(0)  (1 + interestRate)]  (1 + interestRate)}  (1 + interestRate); First called for lump sum Second called for new capital 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Recursion in SD Syntax: 07/11/2018 15:01:08 Marc Conrad - University of Luton

Marc Conrad - University of Luton Structure of SD Centralised structure -- Fork: Everything is handled and controlled by the left-most block. 07/11/2018 15:01:08 Marc Conrad - University of Luton

Structure of SD (Cont’d) Decentralised structure -- Stair: There is no central control block. 07/11/2018 15:01:08 Marc Conrad - University of Luton