SlideShare ist ein Scribd-Unternehmen logo
1 von 29
CHAPTER 10 
Requirements Analysis 
Software System 
Engineering (260CT) 
11/05/14 1
In This Lecture You Will Learn: 
 Why we analyse requirements 
 Technical terms used with class diagrams 
 How the UML class diagram expresses a 
detailed model of user requirements 
 How to realize use cases with collaboration 
diagrams and class diagrams 
 How the CRC technique helps identify classes 
and allocate responsibilities 
11/05/14 2
Why Analyse Requirements? 
Use case model alone is not enough 
• There may be repetition 
• Some parts may already exist as standard 
components 
Analysis aims to identify: 
• Common elements 
• Pre-existing elements 
• Interaction between different requirements 
11/05/14 3
What a Requirements Model 
Must Do 
A requirements model meets two main 
needs: 
 Confirms what users want a new 
system to do 
• Must be understandable for users 
• Must be correct and complete 
 Specifies what designers must design 
• Must be unambiguous 
11/05/14 4
What a Requirements Model 
Must Do 
 Describes what the software should do 
 Represents people, things and concepts 
important to understand what is going on 
 Shows connections and interactions among 
these people, things and concepts 
 Shows the business situation in enough detail 
to evaluate possible designs 
 Is organized so as to be useful for designing 
the software 
11/05/14 5
How We Model the Analysis 
The main tool used for analysing 
requirements is the class diagram 
Two main ways to produce this: 
• Directly based on knowledge of the 
application domain (a Domain Model) 
• By producing a separate class diagram for 
each use case, then assembling them into a 
single model (an Analysis Class Model) 
11/05/14 6
Class Diagram: Stereotypes 
Analysis class stereotypes differentiate 
the roles objects can play: 
• Boundary objects model interaction between 
the system and actors (and other systems) 
• Entity objects represent information and 
behaviour in the application domain 
• Control objects co-ordinate and control other 
objects 
11/05/14 7
Class Diagram: Stereotypes 
Alternative notations for boundary 
class: 
User Interface::AddAdvertUI 
<<boundary>> 
User Interface::AddAdvertUI 
startInterface( ) 
assignStaff( ) 
selectClient( ) 
selectCampaign( ) 
User Interface::AddAdvertUI 
startInterface( ) 
assignStaff( ) 
selectClient( ) 
selectCampaign( ) 
11/05/14 8
Class Diagram: Stereotypes 
Alternative notations for entity class: 
Campaign 
<<entity>> 
Campaign 
title 
campaignStartDate 
campaignFinishDate 
getCampaignAdverts( ) 
addNewAdvert( ) 
Campaign 
title 
campaignStartDate 
campaignFinishDate 
getCampaignAdverts( ) 
addNewAdvert( ) 
11/05/14 9
Class Diagram: Stereotypes 
Alternative notations for control class: 
<<control>> 
11/05/14 10 
AddAvert 
Control::AddAdvert 
showClientCampaigns( ) 
showCampaignAdverts( ) 
createNewAdvert( ) 
Control::AddAdvert 
showClientCampaigns( ) 
showCampaignAdverts( ) 
createNewAdvert( )
Class Diagram: Class Symbol 
Client 
companyAddress 
companyEmail 
companyFax 
companyName 
companyTelephone 
Class name compartment 
Attributes compartment 
Operations compartment 
11/05/14 11
Class Diagram: Instance Symbol 
FoodCo:Client 
companyAddress=Evans Farm, Norfolk 
companyEmail=mail@foodco.com 
companyFax=01589-008636 
companyName=FoodCo 
companyTelephone=01589-008638 
Object name 
compartment 
Attribute values 
Instances do not 
have operations 
11/05/14 12
Class Diagram: Attributes 
Attributes are: 
Part of the essential description of a 
class 
The common structure of what the class 
can ‘know’ 
Each object has its own value for each 
attribute in its class 
11/05/14 13
Class Diagram: Associations 
Association role Association 
StaffMember 
staffName 
staffNo 
staffStartDate 
Client 
companyAddress 
companyEmail 
companyFax 
companyName 
companyTelephone 
staffContact 
liaises with 
Association name Direction in which 
name should be 
read 
11/05/14 14
Class Diagram: Links 
A link is a logical 
connection between two 
objects 
FoodCo:Client 
Yellow Partridge:Client 
Soong Motor Co:Client 
Grace Chia:StaffMember 
Carlos Moncada:StaffMember 
11/05/14 15
Class Diagram: Associations 
Associations represent: 
The possibility of a logical relationship or 
connection between objects of one class 
and objects of another 
If two objects can be linked, their classes 
have an association 
11/05/14 16
Class Diagram: Multiplicity 
Associations have multiplicity 
Multiplicity is the range of permitted 
cardinalities of an association 
Represent enterprise (or business) rules 
For example: 
• Any bank customer may have one or more 
accounts 
• Every account is for one, and only one, 
customer 
11/05/14 17
Class Diagram: Multiplicity 
StaffMember 
staffName 
staffNo 
staffStartDate 
Client 
companyAddress 
companyEmail 
companyFax 
companyName 
companyTelephone 
Multiplicities 
1 0..* 
liaises with 
•Exactly one staff member liaises with each client 
•A staff member may liaise with zero, one or more clients 
11/05/14 18
Class Diagram: Operations 
Operations are: 
An essential part of the description of a 
class 
The common behaviour shared by all 
objects of the class 
Services that objects of a class can 
provide to other objects 
11/05/14 19
Class Diagram: Operations 
 Operations describe 
what instances of a 
class can do: 
• Set or reveal attribute 
values 
• Perform calculations 
• Send messages to 
other objects 
• Create or destroy links 
Campaign 
actualCost 
campaignFinishDate 
campaignStartDate 
completionDate 
datePaid 
estimatedCost 
title 
checkCampaignBudget ( ) 
getCampaignContribution ( ) 
recordPayment ( ) 
setCompleted ( ) 
11/05/14 20
From Requirements to Classes 
Campaign 
Manager 
Add a new advert to 
a campaign 
Add a new advert to 
a campaign 
: 
Clien 
t 
:Campaign :Advert 
4: selectCampaign() 4.1: showCampaignAdverts() 
<<boundary>> 
4.1.2: *getAdvertDetails() 
5.1.1: addNewAdvert() 
<<entity>> 
<<entity>> 
<<control>> 
1:*getClient() 
11/05/14 21 
<<entity>> 
Advert 
setCompleted() 
createNewAdvert() 
User Interface::AddAdvertUI 
startInterface() 
createNewAdvert() 
selectClient() 
selectCampaign() 
Campaign 
title 
campaignStartDate 
campaignFinishDate 
getCampaignAdverts() 
addNewAdvert() 
1 0..* 
conducted by 
Client 
companyAddress 
companyName 
companyTelephone 
companyFax 
companyEmail 
getClientCampaigns() 
getClients() 
1 0..* 
places 
Control::AddAdvert 
showClientCampaigns() 
showCampaignAdverts() 
createNewAdvert() 
Campaign 
Manager 
3.1.2: *getCampaignDetails() 
5.1.1.1: createAdvert() 
:AddAdvertUI :AddAdvert 
:Client :Campaign 
:Advert 
3.1: showClientCampaigns(3: selectClient() ) 
4.1.1: listAdverts() 
5: createNewAdvert() 5.1: addNewAdvert() 
newAd:Advert 
2: startInterface() 
3.1.1: listCampaigns() 
1 
2 
3 
4
From Requirements to Classes 
Start with one use case 
Identify the likely classes involved (the 
use case collaboration) 
Draw a collaboration diagram that fulfils 
the needs of the use case 
Translate this collaboration into a class 
diagram 
Repeat for other use cases 
11/05/14 22
Reasonability Checks for 
Candidate Classes 
A number of tests help to check whether 
a candidate class is reasonable 
• Is it beyond the scope of the system? 
• Does it refer to the system as a whole? 
• Does it duplicate another class? 
• Is it too vague? 
• (More on next slide) 
11/05/14 23
Reasonability Checks for 
Candidate Classes (cont’d) 
• Is it too tied up with physical inputs and 
outputs? 
• Is it really an attribute? 
• Is it really an operation? 
• Is it really an association? 
If any answer is ‘Yes’, consider 
modelling the potential class in some 
other way (or do not model it at all) 
11/05/14 24
CRC Cards 
Class–Responsibility–Collaboration 
cards help to model interaction between 
objects 
For a given scenario (or use case): 
• Brainstorm the objects 
• Allocate to team members 
• Role play the interaction 
11/05/14 25
CRC Cards 
Class Name: 
Responsibilities Collaborations 
Responsibilities of a class 
are listed in this section. 
Collaborations with other 
classes are listed here, 
together with a brief 
description of the purpose of 
the collaboration. 
11/05/14 26
Class Name Client 
Responsibilities Collaborations 
Provide client 
information. 
Campaign provides 
campaign details. 
Provide list of 
campaigns. 
Class Name Campaign 
Responsibilities Collaborations 
Provide campaign 
information. 
Provide list of adverts. 
Add a new advert. 
Advert provides advert details. 
Advert constructs new object. 
Class Name Advert 
Responsibilities Collaborations 
Provide advert details. 
Construct adverts. 
11/05/14 27
CRC Cards 
 Effective role play depends on an explicit 
strategy for distributing responsibility among 
classes 
 For example: 
• Each role player tries to be lazy 
• Persuades other players their class should accept 
responsibility for a given task 
 May use ‘Paper CASE’ to document the 
associations and links 
11/05/14 28
Summary 
In this lecture you have learned: 
 Why we analyse requirements 
 Technical terms used with class diagrams 
 How the UML class diagram expresses a 
detailed model of user requirements 
 How to realize use cases with collaboration 
diagrams and class diagrams 
 How the CRC technique helps identify classes 
and allocate responsibilities 
11/05/14 29

Weitere ähnliche Inhalte

Andere mochten auch (13)

High Level Programming Constructs
High Level Programming ConstructsHigh Level Programming Constructs
High Level Programming Constructs
 
Systems Engineering - a smarter way
Systems Engineering - a smarter waySystems Engineering - a smarter way
Systems Engineering - a smarter way
 
Complex System Engineering
Complex System EngineeringComplex System Engineering
Complex System Engineering
 
waterfall model
waterfall modelwaterfall model
waterfall model
 
Ch12 safety engineering
Ch12 safety engineeringCh12 safety engineering
Ch12 safety engineering
 
software project management Waterfall model
software project management Waterfall modelsoftware project management Waterfall model
software project management Waterfall model
 
Waterfall Model
Waterfall ModelWaterfall Model
Waterfall Model
 
Ch5- Software Engineering 9
Ch5- Software Engineering 9Ch5- Software Engineering 9
Ch5- Software Engineering 9
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
 
Waterfall model
Waterfall modelWaterfall model
Waterfall model
 
Finance projects topics
Finance projects topicsFinance projects topics
Finance projects topics
 
Software engineering lecture notes
Software engineering lecture notesSoftware engineering lecture notes
Software engineering lecture notes
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Ähnlich wie Software System Engineering - Chapter 10

documen.site_chapters-17-formulation-and-planning-for-web-engineering.pdf
documen.site_chapters-17-formulation-and-planning-for-web-engineering.pdfdocumen.site_chapters-17-formulation-and-planning-for-web-engineering.pdf
documen.site_chapters-17-formulation-and-planning-for-web-engineering.pdf
MisfahulAnfiyaTN
 
M03 1 Structuraldiagrams
M03 1 StructuraldiagramsM03 1 Structuraldiagrams
M03 1 Structuraldiagrams
Dang Tuan
 
Creating a Use Case
Creating a Use Case                                               Creating a Use Case
Creating a Use Case
CruzIbarra161
 
MISY 3331 Advanced Database ConceptsAssignment 3Dr. Sotirios .docx
MISY 3331 Advanced Database ConceptsAssignment 3Dr.  Sotirios .docxMISY 3331 Advanced Database ConceptsAssignment 3Dr.  Sotirios .docx
MISY 3331 Advanced Database ConceptsAssignment 3Dr. Sotirios .docx
altheaboyer
 
Programming Paradigm Seminar 4
Programming Paradigm Seminar 4Programming Paradigm Seminar 4
Programming Paradigm Seminar 4
neoxiuting
 
ENGR 131 Elementary Computer ProgrammingTeam IN – Instructor
ENGR 131  Elementary Computer ProgrammingTeam IN – InstructorENGR 131  Elementary Computer ProgrammingTeam IN – Instructor
ENGR 131 Elementary Computer ProgrammingTeam IN – Instructor
TanaMaeskm
 
Analysis and design of entreprise with uml
Analysis and design of entreprise with umlAnalysis and design of entreprise with uml
Analysis and design of entreprise with uml
zineb encgk
 

Ähnlich wie Software System Engineering - Chapter 10 (20)

Creating a DRF template
Creating a DRF templateCreating a DRF template
Creating a DRF template
 
M03_1_Structur alDiagrams.ppt
M03_1_Structur                         alDiagrams.pptM03_1_Structur                         alDiagrams.ppt
M03_1_Structur alDiagrams.ppt
 
Software System Engineering - Chapter 9
Software System Engineering - Chapter 9Software System Engineering - Chapter 9
Software System Engineering - Chapter 9
 
Modeling Object Oriented Applications by Using Dynamic Information for the I...
Modeling Object Oriented Applications by Using Dynamic  Information for the I...Modeling Object Oriented Applications by Using Dynamic  Information for the I...
Modeling Object Oriented Applications by Using Dynamic Information for the I...
 
Software System Engineering - Chapter 12
Software System Engineering - Chapter 12Software System Engineering - Chapter 12
Software System Engineering - Chapter 12
 
documen.site_chapters-17-formulation-and-planning-for-web-engineering.pdf
documen.site_chapters-17-formulation-and-planning-for-web-engineering.pdfdocumen.site_chapters-17-formulation-and-planning-for-web-engineering.pdf
documen.site_chapters-17-formulation-and-planning-for-web-engineering.pdf
 
M03 1 Structuraldiagrams
M03 1 StructuraldiagramsM03 1 Structuraldiagrams
M03 1 Structuraldiagrams
 
Object Oriented Analysis and Design with UML2 part2
Object Oriented Analysis and Design with UML2 part2Object Oriented Analysis and Design with UML2 part2
Object Oriented Analysis and Design with UML2 part2
 
Lecture note05 slides
Lecture note05 slidesLecture note05 slides
Lecture note05 slides
 
Defining The System
Defining The SystemDefining The System
Defining The System
 
Creating a Use Case
Creating a Use Case                                               Creating a Use Case
Creating a Use Case
 
MISY 3331 Advanced Database ConceptsAssignment 3Dr. Sotirios .docx
MISY 3331 Advanced Database ConceptsAssignment 3Dr.  Sotirios .docxMISY 3331 Advanced Database ConceptsAssignment 3Dr.  Sotirios .docx
MISY 3331 Advanced Database ConceptsAssignment 3Dr. Sotirios .docx
 
software development methodologies
software development methodologiessoftware development methodologies
software development methodologies
 
Oracle Payables R12 ivas
Oracle Payables R12 ivasOracle Payables R12 ivas
Oracle Payables R12 ivas
 
CSC410-Presentation
CSC410-PresentationCSC410-Presentation
CSC410-Presentation
 
Programming Paradigm Seminar 4
Programming Paradigm Seminar 4Programming Paradigm Seminar 4
Programming Paradigm Seminar 4
 
Software Engineering Project Report. Help for Admission Test Students (HATS).
Software Engineering Project Report. Help for Admission Test Students (HATS).Software Engineering Project Report. Help for Admission Test Students (HATS).
Software Engineering Project Report. Help for Admission Test Students (HATS).
 
Software System Engineering - Chapter 13
Software System Engineering - Chapter 13Software System Engineering - Chapter 13
Software System Engineering - Chapter 13
 
ENGR 131 Elementary Computer ProgrammingTeam IN – Instructor
ENGR 131  Elementary Computer ProgrammingTeam IN – InstructorENGR 131  Elementary Computer ProgrammingTeam IN – Instructor
ENGR 131 Elementary Computer ProgrammingTeam IN – Instructor
 
Analysis and design of entreprise with uml
Analysis and design of entreprise with umlAnalysis and design of entreprise with uml
Analysis and design of entreprise with uml
 

Mehr von Fadhil Ismail

Mehr von Fadhil Ismail (20)

Common Law Presentation (22034)
Common Law Presentation (22034)Common Law Presentation (22034)
Common Law Presentation (22034)
 
Kertas Kerja Tenis
Kertas Kerja TenisKertas Kerja Tenis
Kertas Kerja Tenis
 
Contoh Borang Soal Selidik Poligami
Contoh Borang Soal Selidik PoligamiContoh Borang Soal Selidik Poligami
Contoh Borang Soal Selidik Poligami
 
Frontpage vs dreamweaver
Frontpage vs dreamweaverFrontpage vs dreamweaver
Frontpage vs dreamweaver
 
Isu-isu Kekeluargaan - Poligami
Isu-isu Kekeluargaan - PoligamiIsu-isu Kekeluargaan - Poligami
Isu-isu Kekeluargaan - Poligami
 
Software System Engineering - Chapter 15
Software System Engineering - Chapter 15Software System Engineering - Chapter 15
Software System Engineering - Chapter 15
 
Software System Engineering - Chapter 14
Software System Engineering - Chapter 14Software System Engineering - Chapter 14
Software System Engineering - Chapter 14
 
Software System Engineering - Chapter 11
Software System Engineering - Chapter 11Software System Engineering - Chapter 11
Software System Engineering - Chapter 11
 
Software System Engineering - Chapter 8
Software System Engineering - Chapter 8Software System Engineering - Chapter 8
Software System Engineering - Chapter 8
 
Software System Engineering - Chapter 7
Software System Engineering - Chapter 7Software System Engineering - Chapter 7
Software System Engineering - Chapter 7
 
Software System Engineering - Chapter 6
Software System Engineering - Chapter 6Software System Engineering - Chapter 6
Software System Engineering - Chapter 6
 
Software System Engineering - Chapter 5
Software System Engineering - Chapter 5Software System Engineering - Chapter 5
Software System Engineering - Chapter 5
 
Software System Engineering - Chapter 4
Software System Engineering - Chapter 4Software System Engineering - Chapter 4
Software System Engineering - Chapter 4
 
Software System Engineering - Chapter 3
Software System Engineering - Chapter 3Software System Engineering - Chapter 3
Software System Engineering - Chapter 3
 
Software System Engineering - Chapter 2
Software System Engineering - Chapter 2Software System Engineering - Chapter 2
Software System Engineering - Chapter 2
 
Software System Engineering - Chapter 1
Software System Engineering - Chapter 1Software System Engineering - Chapter 1
Software System Engineering - Chapter 1
 
Hubungan Etnik Bab 3
Hubungan Etnik Bab 3Hubungan Etnik Bab 3
Hubungan Etnik Bab 3
 
Hubungan Etnik Bab-5
Hubungan Etnik Bab-5Hubungan Etnik Bab-5
Hubungan Etnik Bab-5
 
Hubungan Etnik Bab-6
Hubungan Etnik Bab-6Hubungan Etnik Bab-6
Hubungan Etnik Bab-6
 
Hubungan Etnik Bab-1
Hubungan Etnik Bab-1Hubungan Etnik Bab-1
Hubungan Etnik Bab-1
 

Kürzlich hochgeladen

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Kürzlich hochgeladen (20)

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 

Software System Engineering - Chapter 10

  • 1. CHAPTER 10 Requirements Analysis Software System Engineering (260CT) 11/05/14 1
  • 2. In This Lecture You Will Learn:  Why we analyse requirements  Technical terms used with class diagrams  How the UML class diagram expresses a detailed model of user requirements  How to realize use cases with collaboration diagrams and class diagrams  How the CRC technique helps identify classes and allocate responsibilities 11/05/14 2
  • 3. Why Analyse Requirements? Use case model alone is not enough • There may be repetition • Some parts may already exist as standard components Analysis aims to identify: • Common elements • Pre-existing elements • Interaction between different requirements 11/05/14 3
  • 4. What a Requirements Model Must Do A requirements model meets two main needs:  Confirms what users want a new system to do • Must be understandable for users • Must be correct and complete  Specifies what designers must design • Must be unambiguous 11/05/14 4
  • 5. What a Requirements Model Must Do  Describes what the software should do  Represents people, things and concepts important to understand what is going on  Shows connections and interactions among these people, things and concepts  Shows the business situation in enough detail to evaluate possible designs  Is organized so as to be useful for designing the software 11/05/14 5
  • 6. How We Model the Analysis The main tool used for analysing requirements is the class diagram Two main ways to produce this: • Directly based on knowledge of the application domain (a Domain Model) • By producing a separate class diagram for each use case, then assembling them into a single model (an Analysis Class Model) 11/05/14 6
  • 7. Class Diagram: Stereotypes Analysis class stereotypes differentiate the roles objects can play: • Boundary objects model interaction between the system and actors (and other systems) • Entity objects represent information and behaviour in the application domain • Control objects co-ordinate and control other objects 11/05/14 7
  • 8. Class Diagram: Stereotypes Alternative notations for boundary class: User Interface::AddAdvertUI <<boundary>> User Interface::AddAdvertUI startInterface( ) assignStaff( ) selectClient( ) selectCampaign( ) User Interface::AddAdvertUI startInterface( ) assignStaff( ) selectClient( ) selectCampaign( ) 11/05/14 8
  • 9. Class Diagram: Stereotypes Alternative notations for entity class: Campaign <<entity>> Campaign title campaignStartDate campaignFinishDate getCampaignAdverts( ) addNewAdvert( ) Campaign title campaignStartDate campaignFinishDate getCampaignAdverts( ) addNewAdvert( ) 11/05/14 9
  • 10. Class Diagram: Stereotypes Alternative notations for control class: <<control>> 11/05/14 10 AddAvert Control::AddAdvert showClientCampaigns( ) showCampaignAdverts( ) createNewAdvert( ) Control::AddAdvert showClientCampaigns( ) showCampaignAdverts( ) createNewAdvert( )
  • 11. Class Diagram: Class Symbol Client companyAddress companyEmail companyFax companyName companyTelephone Class name compartment Attributes compartment Operations compartment 11/05/14 11
  • 12. Class Diagram: Instance Symbol FoodCo:Client companyAddress=Evans Farm, Norfolk companyEmail=mail@foodco.com companyFax=01589-008636 companyName=FoodCo companyTelephone=01589-008638 Object name compartment Attribute values Instances do not have operations 11/05/14 12
  • 13. Class Diagram: Attributes Attributes are: Part of the essential description of a class The common structure of what the class can ‘know’ Each object has its own value for each attribute in its class 11/05/14 13
  • 14. Class Diagram: Associations Association role Association StaffMember staffName staffNo staffStartDate Client companyAddress companyEmail companyFax companyName companyTelephone staffContact liaises with Association name Direction in which name should be read 11/05/14 14
  • 15. Class Diagram: Links A link is a logical connection between two objects FoodCo:Client Yellow Partridge:Client Soong Motor Co:Client Grace Chia:StaffMember Carlos Moncada:StaffMember 11/05/14 15
  • 16. Class Diagram: Associations Associations represent: The possibility of a logical relationship or connection between objects of one class and objects of another If two objects can be linked, their classes have an association 11/05/14 16
  • 17. Class Diagram: Multiplicity Associations have multiplicity Multiplicity is the range of permitted cardinalities of an association Represent enterprise (or business) rules For example: • Any bank customer may have one or more accounts • Every account is for one, and only one, customer 11/05/14 17
  • 18. Class Diagram: Multiplicity StaffMember staffName staffNo staffStartDate Client companyAddress companyEmail companyFax companyName companyTelephone Multiplicities 1 0..* liaises with •Exactly one staff member liaises with each client •A staff member may liaise with zero, one or more clients 11/05/14 18
  • 19. Class Diagram: Operations Operations are: An essential part of the description of a class The common behaviour shared by all objects of the class Services that objects of a class can provide to other objects 11/05/14 19
  • 20. Class Diagram: Operations  Operations describe what instances of a class can do: • Set or reveal attribute values • Perform calculations • Send messages to other objects • Create or destroy links Campaign actualCost campaignFinishDate campaignStartDate completionDate datePaid estimatedCost title checkCampaignBudget ( ) getCampaignContribution ( ) recordPayment ( ) setCompleted ( ) 11/05/14 20
  • 21. From Requirements to Classes Campaign Manager Add a new advert to a campaign Add a new advert to a campaign : Clien t :Campaign :Advert 4: selectCampaign() 4.1: showCampaignAdverts() <<boundary>> 4.1.2: *getAdvertDetails() 5.1.1: addNewAdvert() <<entity>> <<entity>> <<control>> 1:*getClient() 11/05/14 21 <<entity>> Advert setCompleted() createNewAdvert() User Interface::AddAdvertUI startInterface() createNewAdvert() selectClient() selectCampaign() Campaign title campaignStartDate campaignFinishDate getCampaignAdverts() addNewAdvert() 1 0..* conducted by Client companyAddress companyName companyTelephone companyFax companyEmail getClientCampaigns() getClients() 1 0..* places Control::AddAdvert showClientCampaigns() showCampaignAdverts() createNewAdvert() Campaign Manager 3.1.2: *getCampaignDetails() 5.1.1.1: createAdvert() :AddAdvertUI :AddAdvert :Client :Campaign :Advert 3.1: showClientCampaigns(3: selectClient() ) 4.1.1: listAdverts() 5: createNewAdvert() 5.1: addNewAdvert() newAd:Advert 2: startInterface() 3.1.1: listCampaigns() 1 2 3 4
  • 22. From Requirements to Classes Start with one use case Identify the likely classes involved (the use case collaboration) Draw a collaboration diagram that fulfils the needs of the use case Translate this collaboration into a class diagram Repeat for other use cases 11/05/14 22
  • 23. Reasonability Checks for Candidate Classes A number of tests help to check whether a candidate class is reasonable • Is it beyond the scope of the system? • Does it refer to the system as a whole? • Does it duplicate another class? • Is it too vague? • (More on next slide) 11/05/14 23
  • 24. Reasonability Checks for Candidate Classes (cont’d) • Is it too tied up with physical inputs and outputs? • Is it really an attribute? • Is it really an operation? • Is it really an association? If any answer is ‘Yes’, consider modelling the potential class in some other way (or do not model it at all) 11/05/14 24
  • 25. CRC Cards Class–Responsibility–Collaboration cards help to model interaction between objects For a given scenario (or use case): • Brainstorm the objects • Allocate to team members • Role play the interaction 11/05/14 25
  • 26. CRC Cards Class Name: Responsibilities Collaborations Responsibilities of a class are listed in this section. Collaborations with other classes are listed here, together with a brief description of the purpose of the collaboration. 11/05/14 26
  • 27. Class Name Client Responsibilities Collaborations Provide client information. Campaign provides campaign details. Provide list of campaigns. Class Name Campaign Responsibilities Collaborations Provide campaign information. Provide list of adverts. Add a new advert. Advert provides advert details. Advert constructs new object. Class Name Advert Responsibilities Collaborations Provide advert details. Construct adverts. 11/05/14 27
  • 28. CRC Cards  Effective role play depends on an explicit strategy for distributing responsibility among classes  For example: • Each role player tries to be lazy • Persuades other players their class should accept responsibility for a given task  May use ‘Paper CASE’ to document the associations and links 11/05/14 28
  • 29. Summary In this lecture you have learned:  Why we analyse requirements  Technical terms used with class diagrams  How the UML class diagram expresses a detailed model of user requirements  How to realize use cases with collaboration diagrams and class diagrams  How the CRC technique helps identify classes and allocate responsibilities 11/05/14 29

Hinweis der Redaktion

  1. For reasons of brevity, these slides do not cover in any detail the creation of a class diagram for a use case. Nor do they cover the assembly of an analysis class model from the various use case class diagrams. It is recommended that extra material is added on these topics. Or better, that time is spent on in-class exercises to illustrate the techniques and decisions involved.
  2. This will require some explanation, either on whiteboard or with prepared examples on a handout.