Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object Oriented Design Model

Similar presentations


Presentation on theme: "Object Oriented Design Model"— Presentation transcript:

1 Object Oriented Design Model
COS50-3 OOSD Object Oriented Design Model (Week 4) 19/11/2018 Marc Conrad / Dayou Li

2 System Specification The entire model of recycling machine
Receipt printer Deposit item receiver Alarm device Customer panel Deposit item receiver Report control Receipt basis Deposit items Operator panel can bottle crate 19/11/2018 Marc Conrad / Dayou Li

3 System Specification (Cont’d)
System specification or logical structure is about system “components” and their relationship. This is displayed in the OO analysis model with a set of analysis classes (objects) and associations. -- analysis classes represent “components”, -- association represents relationship. The model also shows sub-systems and the relations between the subsystems. 19/11/2018 Marc Conrad / Dayou Li

4 System Specification (Cont’d)
System and subsystems Customer panel Receipt printer Deposit item receiver Receipt basis Deposit items can bottle crate Alarm device Deposit item receiver Operator panel Report control 19/11/2018 Marc Conrad / Dayou Li

5 Traceability Traceability -- showing step-by-step how user’s requirements are satisfied in the course of software development and where changes are introduced during the lifecycle of a system. This is important for being able to trace back when we want to find places where things go wrong. So far, we are able to trace back from OO analysis model to use case diagram as the OOAM comes from use cases. Traceability needs to be kept on and on in the whole course of software development. 19/11/2018 Marc Conrad / Dayou Li

6 What is “New” in Design Design aims to give such a detailed description of a system that actual coding can start based on it. Design model is required to represent the description. Actual implementation environment need to be taken into account when building up the design model. Functional localisation guarantees that any functionality change will not influence large part of a system. 19/11/2018 Marc Conrad / Dayou Li

7 Converting OOAM The process of constructing a design model starts from OOAM, to guarantee the logic and traceability. Conversion -- change objects, known as “analysis classes” in Rational Rose, in an OOAM to “blocks”, -- split a block into several blocks or simply add more blocks if necessary. Traceability -- bridging OOAM and OODM so that one can see how OODM “inherits” system’s logic from OOAM. Functional localisation -- functionality is restricted in each block. 19/11/2018 Marc Conrad / Dayou Li

8 Converting OOAM (Cont’d)
Example: (We focus on the return item use case.) Customer panel Receipt printer Deposit item receiver Receipt basis Deposit items can bottle crate 19/11/2018 Marc Conrad / Dayou Li

9 Implementation Environment
Target environment -- where system will execute. Programming language. existing products -- e.g. Database. Taking them into consideration in design: Encapsulation -- new block will be created. Component-based design. 19/11/2018 Marc Conrad / Dayou Li

10 Sequence Diagram Details, then, need to be given for each block.
BUT, inputs and outputs of a block MUST be known before thinking about the details of a block. Sequence diagram helps to find out the inputs and the outputs. 19/11/2018 Marc Conrad / Dayou Li

11 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. 19/11/2018 Marc Conrad / Dayou Li

12 Sequence Diagram (Cont’d)
Syntax and Semantics message Block’s life line (showing life cycle) Distinguishing a system and the outside world (RationalRose: Use Actors ) Events occurring within a block feedback signal 19/11/2018 Marc Conrad / Dayou Li

13 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. 19/11/2018 Marc Conrad / Dayou Li

14 Sequence Diagram (Cont’d)
Example: (focusing on Returning item use case) Blocks: -- Customer Panel, -- Deposit item receiver, -- Receipt basis, -- Deposit item, -- Receipt printer. 19/11/2018 Marc Conrad / Dayou Li

15 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; 19/11/2018 Marc Conrad / Dayou Li

16 Sequence Diagram (Cont’d)
Events (when the customer presses receipt button): Print Logo and date; for (all types of items) { 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; 19/11/2018 Marc Conrad / Dayou Li

17 Sequence Diagram

18 Sequence Diagram

19 Rational Rose – Collaboration Diagram
19/11/2018 Marc Conrad / Dayou Li

20 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. 19/11/2018 Marc Conrad / Dayou Li

21 Synchronous & Asynchronous
Simple (unspecified) synchronous asynchronous 19/11/2018 Marc Conrad / Dayou Li

22 Control in SD (Cont’d) 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? 19/11/2018 Marc Conrad / Dayou Li

23 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, the “print” message could not be sent out to the printer if getValue and getName were asynchronous. For this reason, getValue signal and getName signal must be synchronous. 19/11/2018 Marc Conrad / Dayou Li

24

25 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. 19/11/2018 Marc Conrad / Dayou Li

26

27 Recursion in SD Syntax: 19/11/2018 Marc Conrad / Dayou Li

28 Structure of SD Centralised structure -- Fork: Everything is handled and controlled by the left-most block. 19/11/2018 Marc Conrad / Dayou Li

29 Structure of SD (Cont’d)
Decentralised structure -- Stair: There is no central control block. 19/11/2018 Marc Conrad / Dayou Li


Download ppt "Object Oriented Design Model"

Similar presentations


Ads by Google