43
3 3 rd rd Unit Unit System models System models

Software Engineering Unit 3-System Models

Embed Size (px)

DESCRIPTION

Material

Citation preview

Page 1: Software Engineering Unit 3-System Models

33rdrd Unit Unit System modelsSystem models

Page 2: Software Engineering Unit 3-System Models

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

Page 3: Software Engineering Unit 3-System Models

Topics coveredTopics coveredContext modelsContext modelsBehavioural modelsBehavioural modelsData modelsData modelsObject modelsObject modelsCASE workbenchesCASE workbenches

Page 4: Software Engineering Unit 3-System Models

System modellingSystem modellingSystem modelling helps the analyst to understand System modelling helps the analyst to understand the functionality of the system and models are the functionality of the system and models are used to communicate with customers.used to communicate with customers.Different models present the system from different Different models present the system from different perspectivesperspectives–– External perspective showing the systemExternal perspective showing the system’’s context or s context or

environment;environment;–– Behavioural perspective showing the behaviour of the Behavioural perspective showing the behaviour of the

system;system;–– Structural perspective showing the system or data Structural perspective showing the system or data

architecture.architecture.

Page 5: Software Engineering Unit 3-System Models

Model typesModel typesData processing model showing how the data Data processing model showing how the data is processed at different stages.is processed at different stages.Composition model showing how entities are Composition model showing how entities are composed of other entities.composed of other entities.Architectural model showing principal subArchitectural model showing principal sub--systems.systems.Classification model showing how entities Classification model showing how entities have common characteristics.have common characteristics.Stimulus/response model showing the Stimulus/response model showing the systemsystem’’s reaction to events.s reaction to events.

Page 6: Software Engineering Unit 3-System Models

Context modelsContext models

Context models are used to illustrate the Context models are used to illustrate the operational context of a system operational context of a system -- they show they show what lies outside the system boundaries.what lies outside the system boundaries.Social and organisational concerns may Social and organisational concerns may affect the decision on where to position affect the decision on where to position system boundaries.system boundaries.Architectural models show the system and Architectural models show the system and its relationship with other systems.its relationship with other systems.

Page 7: Software Engineering Unit 3-System Models

The context of an ATM systemThe context of an ATM system

Page 8: Software Engineering Unit 3-System Models

Process modelsProcess models

Process models show the overall process Process models show the overall process and the processes that are supported by the and the processes that are supported by the system.system.Data flow models may be used to show the Data flow models may be used to show the processes and the flow of information from processes and the flow of information from one process to another.one process to another.

Page 9: Software Engineering Unit 3-System Models

Equipment procurement processEquipment procurement process

Page 10: Software Engineering Unit 3-System Models

Behavioural modelsBehavioural models

Behavioural models are used to describe Behavioural models are used to describe the overall behaviour of a system.the overall behaviour of a system.Two types of behavioural model are:Two types of behavioural model are:–– Data processing models that show how data is Data processing models that show how data is

processed as it moves through the system;processed as it moves through the system;–– State machine models that show the systems State machine models that show the systems

response to events.response to events.These models show different perspectives These models show different perspectives so both of them are required to describe the so both of them are required to describe the systemsystem’’s behaviour.s behaviour.

Page 11: Software Engineering Unit 3-System Models

DataData--processing modelsprocessing modelsData flow diagrams (DFDs) may be used to Data flow diagrams (DFDs) may be used to model the systemmodel the system’’s data processing.s data processing.These show the processing steps as data These show the processing steps as data flows through a system.flows through a system.DFDs are an intrinsic part of many analysis DFDs are an intrinsic part of many analysis methods.methods.Simple and intuitive notation that customers Simple and intuitive notation that customers can understand.can understand.Show endShow end--toto--end processing of data.end processing of data.

Page 12: Software Engineering Unit 3-System Models

Order processing DFDOrder processing DFD

Page 13: Software Engineering Unit 3-System Models

Data flow diagramsData flow diagrams

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

Page 14: Software Engineering Unit 3-System Models

Insulin pump DFDInsulin pump DFD

Page 15: Software Engineering Unit 3-System Models

State machine modelsState machine models

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

Page 16: Software Engineering Unit 3-System Models

StatechartsStatecharts

Allow the decomposition of a model into Allow the decomposition of a model into subsub--models (see following slide).models (see following slide).A brief description of the actions is included A brief description of the actions is included following the following the ‘‘dodo’’ in each state.in each state.Can be complemented by tables describing Can be complemented by tables describing the states and the stimuli.the states and the stimuli.

Page 17: Software Engineering Unit 3-System Models

Microwave oven modelMicrowave oven model

Page 18: Software Engineering Unit 3-System Models

Microwave oven state descriptionMicrowave oven state description

State Description

Waiting The oven is waiting for input. The display shows the current time.

Half power The oven power is set to 300 watts. The display shows ŌHalf powerÕ.

Full power The oven power is set to 600 watts. The display shows ŌFull powerÕ.

Set time The cooking time is s et to the userÕs input value. The display shows the cooking timeselected and is updated as the time is set.

Disabled Oven operation is disabled for safety. Interior oven light is on. Display shows ŌNotreadyÕ.

Enabled Oven operation is enabled. Interior oven light is off. Display shows ŌReady to cookÕ.

Operation Oven in operation. Interior oven light is on. Display shows the timer countdown. Oncompletion of cooking, the buzzer is sounded for 5 s econds. Oven light is on. Displayshows ŌCooking completeÕ while buzzer is sounding.

Page 19: Software Engineering Unit 3-System Models

Microwave oven stimuliMicrowave oven stimuli

Stimulus Description

Half power The user has pressed the half power button

Full power The user has pressed the full power button

Timer The user has pressed one of the timer buttons

Number The user has pressed a numeric key

Door open The oven door switch is not closed

Door closed The oven door switch is closed

Start The user has pressed the start button

Cancel The user has pressed the cancel button

Page 20: Software Engineering Unit 3-System Models

Microwave oven operationMicrowave oven operation

Page 21: Software Engineering Unit 3-System Models

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

Page 22: Software Engineering Unit 3-System Models

Library semantic modelLibrary semantic model

Page 23: Software Engineering Unit 3-System Models

Data dictionariesData dictionaries

Data dictionaries are lists of all of the names used Data dictionaries are lists of all of the names used in the system models. Descriptions of the entities, in the system models. Descriptions of the entities, relationships and attributes are also included.relationships and attributes are also included.AdvantagesAdvantages–– Support name management and avoid duplication;Support name management and avoid duplication;–– Store of organisational knowledge linking analysis, Store of organisational knowledge linking analysis,

design and implementation;design and implementation;

Many CASE workbenches support data Many CASE workbenches support data dictionaries.dictionaries.

Page 24: Software Engineering Unit 3-System Models

Data dictionary entriesData dictionary entries

Name Description Type Date

Article Details of the published article that may be ordered bypeople using LIBSYS. Entity 30.12.2002

authors The names of the authors of the article who may be duea share of the fee. Attribute 30.12.2002

Buyer The person or organisation that orders a co py of thearticle. Entity 30.12.2002

fee-payable-to

A 1:1 relationship between Article and the CopyrightAgency who should be paid the copyright fee. Relation 29.12.2002

Address(Buyer)

The address of the buyer. This is used to any paperbilling information that is required. Attribute 31.12.2002

Page 25: Software Engineering Unit 3-System Models

Object modelsObject modelsObject models describe the system in terms of Object models describe the system in terms of object classes and their associations.object classes and their associations.An object class is an abstraction over a set of An object class is an abstraction over a set of objects with common attributes and the services objects with common attributes and the services (operations) provided by each object.(operations) provided by each object.Various object models may be producedVarious object models may be produced–– Inheritance models;Inheritance models;–– Aggregation models;Aggregation models;–– Interaction models.Interaction models.

Page 26: Software Engineering Unit 3-System Models

Object modelsObject modelsNatural ways of reflecting the realNatural ways of reflecting the real--world world entities manipulated by the systementities manipulated by the systemMore abstract entities are more difficult to More abstract entities are more difficult to model using this approachmodel using this approachObject class identification is recognised as a Object class identification is recognised as a difficult process requiring a deep difficult process requiring a deep understanding of the application domainunderstanding of the application domainObject classes reflecting domain entities are Object classes reflecting domain entities are reusable across systemsreusable across systems

Page 27: Software Engineering Unit 3-System Models

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

Page 28: Software Engineering Unit 3-System Models

Object models and the UMLObject models and the UML

The UML is a standard representation devised by The UML is a standard representation devised by the developers of widely used objectthe developers of widely used object--oriented oriented analysis and design methods.analysis and design methods.It has become an effective standard for objectIt has become an effective standard for object--oriented modelling.oriented modelling.NotationNotation–– Object classes are rectangles with the name at the top, Object classes are rectangles with the name at the top,

attributes in the middle section and operations in the attributes in the middle section and operations in the bottom section;bottom section;

–– Relationships between object classes (known as Relationships between object classes (known as associations) are shown as lines linking objects;associations) are shown as lines linking objects;

–– Inheritance is referred to as generalisation and is shown Inheritance is referred to as generalisation and is shown ‘‘upwardsupwards’’ rather than rather than ‘‘downwardsdownwards’’ in a hierarchy.in a hierarchy.

Page 29: Software Engineering Unit 3-System Models

Library class hierarchyLibrary class hierarchy

Page 30: Software Engineering Unit 3-System Models

User class hierarchyUser class hierarchy

Page 31: Software Engineering Unit 3-System Models

Multiple inheritanceMultiple inheritanceRather than inheriting the attributes and services Rather than inheriting the attributes and services from a single parent class, a system which from a single parent class, a system which supports multiple inheritance allows object classes supports multiple inheritance allows object classes to inherit from several superto inherit from several super--classes.classes.This can lead to semantic conflicts where This can lead to semantic conflicts where attributes/services with the same name in different attributes/services with the same name in different supersuper--classes have different semantics.classes have different semantics.Multiple inheritance makes class hierarchy Multiple inheritance makes class hierarchy reorganisation more complex.reorganisation more complex.

Page 32: Software Engineering Unit 3-System Models

Multiple inheritanceMultiple inheritance

Page 33: Software Engineering Unit 3-System Models

Object aggregationObject aggregationAn aggregation model shows how classes An aggregation model shows how classes that are collections are composed of other that are collections are composed of other classes.classes.Aggregation models are similar to the partAggregation models are similar to the part--of of relationship in semantic data models.relationship in semantic data models.

Page 34: Software Engineering Unit 3-System Models

Object aggregationObject aggregation

Page 35: Software Engineering Unit 3-System Models

Object behaviour modellingObject behaviour modelling

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

Page 36: Software Engineering Unit 3-System Models

Issue of electronic itemsIssue of electronic items

Page 37: Software Engineering Unit 3-System Models

Structured methodsStructured methods

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

Page 38: Software Engineering Unit 3-System Models

Method weaknessesMethod weaknesses

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

Page 39: Software Engineering Unit 3-System Models

CASE workbenchesCASE workbenches

A coherent set of tools that is designed to A coherent set of tools that is designed to support related software process activities support related software process activities such as analysis, design or testing.such as analysis, design or testing.Analysis and design workbenches support Analysis and design workbenches support system modelling during both requirements system modelling during both requirements engineering and system design.engineering and system design.These workbenches may support a specific These workbenches may support a specific design method or may provide support for a design method or may provide support for a creating several different types of system creating several different types of system model.model.

Page 40: Software Engineering Unit 3-System Models

An analysis and design An analysis and design workbenchworkbench

Page 41: Software Engineering Unit 3-System Models

Analysis workbench componentsAnalysis workbench componentsDiagram editorsDiagram editorsModel analysis and checking toolsModel analysis and checking toolsRepository and associated query languageRepository and associated query languageData dictionaryData dictionaryReport definition and generation toolsReport definition and generation toolsForms definition toolsForms definition toolsImport/export translatorsImport/export translatorsCode generation toolsCode generation tools

Page 42: Software Engineering Unit 3-System Models

Key pointsKey pointsA model is an abstract system view. A model is an abstract system view. Complementary types of model provide Complementary types of model provide different system information.different system information.Context models show the position of a Context models show the position of a system in its environment with other system in its environment with other systems and processes.systems and processes.Data flow models may be used to model the Data flow models may be used to model the data processing in a system.data processing in a system.State machine models model the systemState machine models model the system’’s s behaviour in response to internal or external behaviour in response to internal or external eventsevents

Page 43: Software Engineering Unit 3-System Models

Key pointsKey pointsSemantic data models describe the logical Semantic data models describe the logical structure of data which is imported to or structure of data which is imported to or exported by the systems.exported by the systems.Object models describe logical system Object models describe logical system entities, their classification and aggregation.entities, their classification and aggregation.Sequence models show the interactions Sequence models show the interactions between actors and the system objects that between actors and the system objects that they use.they use.Structured methods provide a framework for Structured methods provide a framework for developing system models.developing system models.