TXT

chap8 System model

By Virginia Rose,2014-05-27 15:07
11 views 0
chap8 System model

     ??ÎÄÓÉÒ??ÛµÆ?ð??Ï×

    pptÎĵµ?ÉÄÜÔÚWAP?Ëä?ÀÀÌåÑé???Ñ????ÒéÄúÓÅÏÈÑ?ÔñTXT???òÏÂÔØÔ?ÎÄ?þµ????ú?é????

     System models Abstract descriptions of systems whose requirements are being analysed

     Software Engineering, 8th edition. Chapter 8

     Slide 1

     Objectives

     To explain why the context of a system should be modelled as part of the RE process To describe behavioural modelling, data modelling and object modelling To introduce some of the notations used in the Unified Modeling Language (UML) To show how CASE workbenches support system modelling

     Software Engineering, 8th edition. Chapter 8 Slide 2

     Topics covered

     Context models Behavioural models Data models UML Object models

     Software Engineering, 8th edition. Chapter 8

     Slide 3

     System modelling

     System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers Different models present the system from different perspectives

     ? ? External perspective showing the system??s context or environment Behavioural perspective showing the behaviour of the system Structural perspective showing the system or data architecture

     Software Engineering, 8th edition. Chapter 8

     Slide 4

     Model types

     Data processing model showing how the data is processed at different stages Composition model showing how entities are composed of other entities Architectural model showing principal sub-systems Classification model showing how entities have common characteristics Stimulus/response model showing the system??s reaction to events

     Software Engineering, 8th edition. Chapter 8

     Slide 5

     Context models

     Context models are used to illustrate the boundaries of a system Social and organisational concerns may affect the decision on where to position system boundaries Architectural models show the a system and its relationship with other systems

     Software Engineering, 8th edition. Chapter 8 Slide 6

     The context of an ATM system

     Security system Branch accounting system Auto-teller system Branch

    counter system Maintenance system Usage database Account database

     Software Engineering, 8th edition. Chapter 8

     Slide 7

     Behavioural models

     Behavioural models are used to describe the overall behaviour of a system Two types of behavioural model are shown here

     ? Data processing models that show how data is processed as it moves through the system State machine models that show the systems response to events

     Both of these models are required for a description of the system??s behaviour

     Software Engineering, 8th edition. Chapter 8

     Slide 8

     Data-processing models

     Data flow diagrams are used to model the system??s data processing These show the processing steps as data flows through a system Intrinsic part of many analysis methods Simple and intuitive notation that customers can understand Show end-to-end processing of data

     Software Engineering, 8th edition. Chapter 8 Slide 9

     Order processing DFD

     Completed order form Order details + blank order form Complete order form Validate order Signed order form Signed order form Record order Order details Signed order form Adjust available budget Order amount + account details Orders file Budget file Send to supplier Checked and signed order + order notification

     Software Engineering, 8th edition. Chapter 8

     Slide 10

     Data flow diagrams

     DFDs model the system from a functional perspective Tracking and documenting how the data associated with a process is helpful to develop an overall understanding of the system Data flow diagrams may also be used in showing the data exchange between a system and other systems in its environment

     Software Engineering, 8th edition. Chapter 8

     Slide 11

     State machine models

     These model the behaviour of the system in response to external and internal events They show the system??s responses to stimuli so are often used for modelling real-time systems State machine models show system states as nodes and events as arcs between these nodes. When an event occurs, the system moves from one state to another Statecharts are an integral part of the UML

     Software Engineering, 8th edition. Chapter 8 Slide 12

     Microwave oven model

     Full power Full power do: set power = 600 Waiting do: display time Full power Half power Timer Door open Half power do: set power = 300 Door closed Disabled do: display 'Waiting'

     Software Engineering, 8th edition. Chapter 8 Slide 13

     Timer Number Set time do: get number exit: set time Door closed Start Enabled do: display 'Ready' Door open Waiting do: display time Operation do: operate oven

     Half power

     Cancel

     Microwave oven state description

     State Waiting Half power Full power Set time Disabled Enabled Operation Description The oven is waiting for input. The display shows the current time. The oven power is set to 300 watts. The display shows ‘Half power??. The oven power is set to 600 watts. The display shows ‘Full power??. The cooking time is set to the user??s input value. The

    display shows the cooking time selected and is updated as the time is set. Oven operation is disabled for safety. Interior oven light is on. Display shows ??Not ready??. Oven operation is enabled. Interior oven light is off. Display shows ??Ready to cook??. Oven in operation. Interior oven light is on. Display shows the timer countdown. On completion of cooking, the buzzer is sounded for 5 seconds. Oven light is on. Display shows ?? Cooking complete?w hile buzzer is sounding.

     Software Engineering, 8th edition. Chapter 8

     Slide 14

     Microwave oven stimuli

     Stimulus Half power Full power Timer Number Door open Door closed Start Cancel Description The user has pressed the half power button The user has pressed the full power button The user has pressed one of the timer buttons The user has pressed a numeric key The oven door switch is not closed The oven door switch is closed The user has pressed the start button The user has pressed the cancel button

     Software Engineering, 8th edition. Chapter 8

     Slide 15

     Statecharts

     Allow the decomposition of a model into submodels (see following slide) A brief description of the actions is included following the ??do?? in each state Can be complemented by tables describing the states and the stimuli

     Software Engineering, 8th edition. Chapter 8

     Slide 16

     Microwave oven operation

     Operation Checking do: check status Turntable fault Alarm do: display event OK Time Cook do: run generator Timeout Done do: buzzer on for 5 secs.

     Emitter fault

     Door open Disabled Waiting

     Cancel

     Software Engineering, 8th edition. Chapter 8

     Slide 17

     Data models

     Used to describe the logical structure of data processed by the system Entity-relation-attribute model sets out the entities in the system, the relationships between these entities and the entity attributes Widely used in database design. Can readily be implemented using relational databases No specific notation provided in the UML but objects and associations can be used

     Software Engineering, 8th edition. Chapter 8 Slide 18

     Data model for the LIBsys

     See Fig. 8.8

     Software Engineering, 8th edition. Chapter 8

     Slide 19

     Data dictionaries

     Data dictionaries are lists of all of the names used in the system models. Descriptions of the entities, relationships and attributes are also included Advantages

     ? Support name management and avoid duplication Store of organisational knowledge linking analysis, design and implementation

     Many CASE workbenches support data dictionaries

     Software Engineering, 8th edition. Chapter 8 Slide 20

     Object models

     Object models describe the system in terms of object classes An object class is an abstraction over a set of objects with common attributes and the services (operations) provided by each object Various object models may be produced

     ? ? Inheritance models Aggregation models Interaction models

     Software Engineering, 8th edition. Chapter 8

     Slide 21

     Object models

     Natural ways of reflecting the real-world entities manipulated by the system More abstract entities are more difficult to model using this approach Object class identification is recognised as a difficult process requiring a deep understanding of the application domain Object classes reflecting domain entities are reusable across systems

     Software Engineering, 8th edition. Chapter 8 Slide 22

     Unified Modelling Language UM L

     A tool for object modelling Devised by the developers of widely used objectoriented analysis and design methods Has become an effective standard for objectoriented modelling

     Software Engineering, 8th edition. Chapter 8

     Slide 23

     UML

     The UML combines the best of the best from

     ? ? ? Data Modelling concepts (Entity Relationship Diagrams) Business Modelling (work flow) Object Modelling Component Modelling

     The UML is the standard language for visualizing, specifying, constructing, and documenting the artifacts of a software-intensive system It can be used with all processes, throughout the development life cycle, and across different implementation technologies

     Software Engineering, 8th edition. Chapter 8

     Slide 24

     UML Sponsors

     -Grady Booch, Jim Rumbaugh, IvarJacobson -Based on Boochmethod, OMT, OOSE

     Software Engineering, 8th edition. Chapter 8

     Slide 25

     UML History

     Software Engineering, 8th edition. Chapter 8

     Slide 26

     UML Concepts

     The UML may be used to:

     ? ? ? ? ? Display the boundary of a system & its major functions using use cases and actors Illustrate use case realizations with interaction diagrams Represent a static structure of a system using class diagrams Model the behavior of objects with state transition diagrams Reveal the physical implementation architecture with component & deployment diagrams Extend your functionality with stereotypes

     Software Engineering, 8th edition. Chapter 8 Slide 27

     The elements of UML

     Things

     Class, interface, package, component etc.

     Relationships

     Generalization, dependency, association, realization

     Diagrams

     ? Be made of things and relationships. Use case diagram, class diagram, sequence diagrams ?? and other diagrams.

     Rules

     Name, scope ,some constraints

     Software Engineering, 8th edition. Chapter 8 Slide 28

     Structural thing: Object classes

     Classes in different abstraction

     Software Engineering, 8th edition. Chapter 8

     Slide 29

     Structural thing : interfaces

     The services set of a class or a component Description of a external

    behavior of a class or a component

     Software Engineering, 8th edition. Chapter 8

     Slide 30

     Examples of interface

     Software Engineering, 8th edition. Chapter 8

     Slide 31

     Structural thing : Components

     Physical parts in system

     Software Engineering, 8th edition. Chapter 8

     Slide 32

     Behavioral thing: interaction

     Communication between objects

     Software Engineering, 8th edition. Chapter 8

     Slide 33

     Grouping thing: package

     Organize some things into a group

     Software Engineering, 8th edition. Chapter 8

     Slide 34

     Comment thing: comment

     Software Engineering, 8th edition. Chapter 8

     Slide 35

     UML relationships

     Association Generalization Dependency Realization

     Software Engineering, 8th edition. Chapter 8

     Slide 36

     Association

     Software Engineering, 8th edition. Chapter 8

     Slide 37

     Aggregation and Composition

     Special association

     Software Engineering, 8th edition. Chapter 8

     Slide 38

     Generalization

     A relationship to show general and special

     Software Engineering, 8th edition. Chapter 8

     Slide 39

     Dependency

     Reflect the relationship that of one thing will be affected by

    another.

     Software Engineering, 8th edition. Chapter 8

     Slide 40

     Realization

     A part is realized by another

     Software Engineering, 8th edition. Chapter 8

     Slide 41

     Relationships

     RegistrationForm RegistrationManager

     addStudent(Course, StudentInfo)

     ScheduleAlgorithm

     Course

     name numberCredits

     Student

     name major

     open() addStudent(StudentInfo)

     Professor

     name tenureStatus

     CourseOffering

     location open() addStudent(StudentInfo)

     Software Engineering, 8th edition. Chapter 8

     Slide 42

     UML diagrams

     Use case diagram Class diagram Object diagram Component diagram Deployment diagram Sequence diagram Collaboration diagram State diagram Activity diagram

     Software Engineering, 8th edition. Chapter 8

     Functional model

     Structural model

     Behavioral model

     Slide 43

     Class Diagrams

     A class diagram shows the existence of classes and their relationships in the logical view of a system UML modelling elements in class diagrams

     ? ? ? Classes and their structure and behaviour Association, aggregation, dependency, inheritance and realization relationships Multiplicity and navigation indicators Role names

     Software Engineering, 8th edition. Chapter 8

     Slide 44

     Inheritance models

     Organise the domain object classes into a hierarchy Classes at the top of the hierarchy reflect the common features of all classes Object classes inherit their attributes and services from one or more super-classes. these may then be specialised as necessary Class hierarchy design is a difficult process if duplication in different branches is to be avoided

     Software Engineering, 8th edition. Chapter 8 Slide 45

     Library item Catalogue number Acquisition date Cost Type Status Number of copies Acquire () Catalogue () Dispose () Issue () Return ()

     Library class hierarchy

     Published item Title Publisher

     Recorded item Title Medium

     Book Author Edition Publication date ISBN

     Magazine Y ear Issue

     Film Director Date of release Distributor

     Computer program Version Platform

     Library user Name Address Phone Registration # Register () De-register ()

     User class hierarchy

     Reader Affiliation

     Borrower Items on loan Max. loans

     Staff Department Department phone

     Student Major subject Home address

     Multiple inheritance

     Rather than inheriting the attributes and services from a single parent class, a system which supports multiple inheritance allows object classes to inherit from several super-classes Can lead to semantic conflicts where attributes/services with the same name in different super-classes have different semantics Makes class hierarchy reorganisation more complex

     Software Engineering, 8th edition. Chapter 8 Slide 48

     Multiple inheritance

     Book Author Edition Publication date ISBN Voice recording Speaker Duration Recording date

     Talking book # Tapes

     Software Engineering, 8th edition. Chapter 8

     Slide 49

     Object aggregation

     Aggregation model shows how classes which are collections are composed of other classes Similar to the part-of relationship in semantic data models

     Software Engineering, 8th edition. Chapter 8

     Slide 50

     Object aggregation

     Study pack Course title Number Y ear Instructor

     Assignment Credits

     OHP slides Slides

     Lecture notes Text

     Videotape Tape ids.

     Exercises #Problems Description

     Solutions Text Diagrams

     Software Engineering, 8th edition. Chapter 8

     Slide 51

     Object behaviour modelling

     A behavioural model shows the interactions between objects to produce some particular system behaviour that is specified as a use-case Sequence diagrams (or collaboration diagrams) in the UML are used to model interaction between objects

     Software Engineering, 8th edition. Chapter 8

     Slide 52

     Issue of electronic items

     Ecat: Catalog :Library User Lookup Display Issue Issue licence Accept licence Compress :Library Item Lib1: NetServer

     Deliver

     Software Engineering, 8th edition. Chapter 8 Slide 53

     Sequence Diagram

     A sequence diagram displays object interactions arranged in a time sequence

     : Student registration form registration manager math 101 math 101 section 1 1: fill in info 2: submit 3: add course(joe, math 01) 4: are you open? 5: are you open? 6: add (joe) 7: add (joe)

     Software Engineering, 8th edition. Chapter 8

     Slide 54

     Structured methods

     Structured methods incorporate system modelling as an inherent part of the method Methods define a set of models, a process for deriving these models and rules and guidelines that should apply to the models CASE tools support system modelling as part of a structured method

     Software Engineering, 8th edition. Chapter 8

     Slide 55

     Method weaknesses

     They do not model non-functional system requirements They do not usually include information about whether a method is appropriate for a given problem The may produce too much documentation The system models are sometimes too detailed and difficult for users to understand

     Software Engineering, 8th edition. Chapter 8 Slide 56

     Key points

     A model is an abstract system view. Complementary types of model provide different system information Context models show the position of a system in its environment with other systems and processes Data flow models may be used to model the data processing in a system State machine models model the system??s behaviour in response to internal or external events Software Engineering, 8th edition. Chapter 8 Slide

57

     Key points

     Semantic data models describe the logical structure of data which is imported to or exported by the systems Object models describe logical system entities, their classification and aggregation Object models describe the logical system entities and their classification and aggregation

     Software Engineering, 8th edition. Chapter 8

     Slide 58

??TXTÓÉ??ÎÄ?â????ÏÂÔØ:http://www.mozhua.net/wenkubao

Report this document

For any questions or suggestions please email
cust-service@docsford.com