SlideShare una empresa de Scribd logo
1 de 22
ITB6006 Object-Oriented Design
Week 5 – Modeling Design Diagram
Lesson Plan
5min Attendance , Welcome , lesson Overview
20 min Stage1: Design Class Diagram
20 min Stage2: Enterprise Architect Activity develop formal sequence diagram
20 min Stage3 : Business Case
30 min Stage4 : Enterprise Architect Activity develop design class diagram
5 min Summary
ITB6006 Object-Oriented Design
Topic
• What is a design class diagram?
• What is the usefulness of a design class diagram?
• How to derive it from other diagrams?
• Organize Classes with Package Diagram
ITB6006 Object-Oriented Design
Software Design
• Software Design determines the software architecture specifying
the subsystems , relationships, subsystems’ functions, interfaces,
look and feel of GUI.
ITB6006 Object-Oriented Design
deployment Deployment View
InterfaceLayer «executionEnvironm...
Controller Layer
«executionEnviron...
Database Layer
User
«device»
Software
Controller
«executionEnviron...
Business Object Layer
Responsible for
interacting with
the User/Devices
Responsible for
Executing
Business
Processes
Responsible for
Executing Functions
of Individual Business
Objects
Responsible for
Storing /Retrieving
Objects from a
Database
Requests
Requests
Requests
«flow»
Requests
Requests
N-Tier Architecture
What is a design class diagram?
• A UML diagram derived from behavioral and domain
models.
• A blueprint to facilitate implementation, testing and
integration
• Contains all the classes, attributes, relationships
(Generalizations→ inheritance, aggregations → composition
and associations → usage), operations needed to satisfy the
requirements
ITB6006 Object-Oriented Design
Usefulness
• Brings together the most significant artifacts in one
diagram
• facilitates quality measurement and assurance
• effort estimation
• work allocation
ITB6006 Object-Oriented Design
Business Case
• In a library management System (LIS) you have 2
requirements
• Req1. LIS must allow a client to check out documents
• Req2. LIS must allow a client to return document
• A Scenario is developed to describe a list of interactions
for req1
• A sequence diagram is generated and tweaked to reflect
the interactions
ITB6006 Object-Oriented Design
sd 1_Basic_Path
customer :customer
:Checkout Page
:Home Page :CheckoutController :DBmgr d :Document
l :Loan
alt
«click
checkout»
Displays Checkout Page ()
«document numbers»
1.msg:checkout(docNo:String) :String
2.d:getDocument(docNo:String) :Document
returns the document d ()
returns the document()
[d!=null]:3. creates Loan (c:customer, d:Document)
4.save(l:Loan)
5.setAvailable(false:boolean)
6.save(d:Document)
7. msg:"Checkout Successful"()
ITB6006 Object-Oriented Design
Formal Messages:
Action →function call
Data or object required → parameters
If function returns result → variable (more
than one additional calls to get functions are
required)
Decide parameter type a:A
Decide return value type x:function (a:A):X
Deriving Formal Messaging
ITB6006 Object-Oriented Design
sd Sequence Rules
Subject Object Acted on
action + other data/objects()
return value()
sd Formal Messages
Subject Object Acted on
returnvalue:action(otherdata/objects)
sd Formal Messages
LoginController
loginPage
verification__result:=verify(uid, passowrd)
sd Sequence Rules
loginPage LoginController
verify uid, password()
verification result()
General Conversion Conversion Example
ITB6006 Object-Oriented Design
sd Sequence Rules
Document
CheckoutController
set available to false()
sd Formal Messages
CheckoutController Document
setAvailable(false)
sd Sequence Rules
CheckoutController
CheckoutPage DBMgr
check document with doc no()
get document()
d()
sd Formal Messages
CheckoutController
CheckoutPage DBMgr
msg:checkout(docNo:string) :string
d:getDocument(docNo:string) :Document
Formally Specified Sequence Diagram
ITB6006 Object-Oriented Design
sd 1_Basic_Path
customer :customer
:Checkout Page
:Home Page :CheckoutController :DBmgr d :Document
l :Loan :Msg
alt
«click
checkout»
Displays Checkout Page ()
1.msg:checkout(docNo:String) :String
create()
«document numbers»
2.d:getDocument(docNo:String) :Document
[d!=null]:3. creates Loan (c:customer, d:Document)
4.save(l:Loan)
5.setAvailable(false:boolean)
6.save(d:Document)
7. msg:"Checkout Successful"()
add("Checkout Success: {0}", d)
Identify Classes from Sequence Diagrams
• Classes of Objects that sends and receives messages are
5 types : GUI, Controller, DB Manager, Other classes
• Classes of Objects that are passed as parameters to a
function call
• Classes that serve as return types
• Classes from Domain Model
ITB6006 Object-Oriented Design
Denoting Accessors
• Due to encapsulation hiding
including all getters and setters will cause the design
diagram to look crowded
• Unordinary getters and setters must be denoted
Ex. Database Manager class get and set operations
getX():X, getY():Y ,…,where X and Y are class names
ITB6006 Object-Oriented Design
sd 1_Basic_Path
A :A B :B
x= m(...) :X
Identify methods from Sequence Diagrams
Message denoted as
x:=m():X
Sent from object A to object B
A calls the m(…) function of B
A saves the result in variable x of
type X
ex.d:=getDocument(callNo:string)
:Document
ex. save(l:loan)
ex. save (d:Document)
ITB6006 Object-Oriented Design
class Class Model
B
+ x:m() :X
Identify Attributes from Sequence Diagrams
• Attributes are scalar types not objects class types
• Identified from messages or methods that
• retrieve objects
• Is ordinary get and set ex. get(docNo)
• Ex. Is Available ():boolean , set Available(b:boolean) where
Available is an adjective
• compute ex. calculateArea ():int
• Are constructors: ex. create document ( docNo:string , title:
string, author:string)
ITB6006 Object-Oriented Design
Identify relationships
• Identify create from calls to constructors
ex. A creates object of B
ex. CheckoutController creates Loan
• Identify use relationship from parameters
ex. A uses B in a function call
• Object of A passes an object of B as a parameter
ex. DBMgr save (d:Document)
ex. DBMgr save (l:loan)
• Object of class A receives and object of class B as a return value
ex. D:=getDocument (docNo:String):Document // from
checkoutcontroller to the Document
ITB6006 Object-Oriented Design
Identify relationships
• Identify call relationships
ex. Object of class A calls a method in B
ex. CheckoutGUI calls Checkout Controller
• Identify aggregation , inheritance from Domain Model
ITB6006 Object-Oriented Design
Review Design Class Diagram
• Ensure that the
classes ,
attributes,
operations,
parameter types,
return types,
return types,
relationships
…are derived correctly
• Does the diagram contains unnecessary classes?
ITB6006 Object-Oriented Design
Review Design Class Diagram
• Ensure that the
classes ,
attributes,
operations,
parameter types,
return types,
return types,
relationships
…names are easy to understand
ITB6006 Object-Oriented Design
Organize Classes with Package Diagram
• Common organization
• Functional
• Architectural Style
• Hybrid Organization
ITB6006 Object-Oriented Design
Ex. Library Functional Subsystems
Circulation: Document, Loan, Client,
CirculationController ...etc
Cataloguing: Catalog, Subject..
CataloguingController…etc.
Purchasing: Order, Request,
PurchasingController…etc
Loan
User Assistance
Ex. Library Architectural Subsystems
Presentation: GUI
Controller: CirculationController , …etc.
Business Objects: Document, Loan…etc.
Database: DBMgr, Storage Objects…etc.
Network: Network communication classes.
Class Activity7
Modeling - 20Minutes
ITB6006 Object-Oriented Design
Refresher on Moodle and Questions?
ITB6006 Object-Oriented Design

Más contenido relacionado

Similar a W5_Modeling Design Diagram (2) - OBJECT ORIENTED DESIGN.pptx

Sample Lab Manual Word Edited aaaaaaaaaaaaaaa
Sample Lab Manual Word Edited aaaaaaaaaaaaaaaSample Lab Manual Word Edited aaaaaaaaaaaaaaa
Sample Lab Manual Word Edited aaaaaaaaaaaaaaaXEON14
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django IntroductionGanga Ram
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaMongoDB
 
Oop lec 5-(class objects, constructor & destructor)
Oop lec 5-(class objects, constructor & destructor)Oop lec 5-(class objects, constructor & destructor)
Oop lec 5-(class objects, constructor & destructor)Asfand Hassan
 
Dbva dotnet programmer_guide_chapter8
Dbva dotnet programmer_guide_chapter8Dbva dotnet programmer_guide_chapter8
Dbva dotnet programmer_guide_chapter8Shakeel Mujahid
 
Joel Landis Net Portfolio
Joel Landis Net PortfolioJoel Landis Net Portfolio
Joel Landis Net Portfoliojlshare
 
Dependency injection crash course
Dependency injection crash courseDependency injection crash course
Dependency injection crash courseRobin Sfez
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyUna Daly
 
Introduction to database-Formal Query language and Relational calculus
Introduction to database-Formal Query language and Relational calculusIntroduction to database-Formal Query language and Relational calculus
Introduction to database-Formal Query language and Relational calculusAjit Nayak
 
SH 1 - SES 8 - Stitch_Overview_TLV.pptx
SH 1 - SES 8 - Stitch_Overview_TLV.pptxSH 1 - SES 8 - Stitch_Overview_TLV.pptx
SH 1 - SES 8 - Stitch_Overview_TLV.pptxMongoDB
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iTaymoor Nazmy
 
Service Oriented Architecture in Magento 2
Service Oriented Architecture in Magento 2Service Oriented Architecture in Magento 2
Service Oriented Architecture in Magento 2Max Pronko
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Sparkhound Inc.
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB
 
Oracle ADF Quick Handy Reference
Oracle ADF Quick Handy ReferenceOracle ADF Quick Handy Reference
Oracle ADF Quick Handy ReferenceDeepak Bhagat
 

Similar a W5_Modeling Design Diagram (2) - OBJECT ORIENTED DESIGN.pptx (20)

Oops concept
Oops conceptOops concept
Oops concept
 
Sample Lab Manual Word Edited aaaaaaaaaaaaaaa
Sample Lab Manual Word Edited aaaaaaaaaaaaaaaSample Lab Manual Word Edited aaaaaaaaaaaaaaa
Sample Lab Manual Word Edited aaaaaaaaaaaaaaa
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
 
Oop lec 5-(class objects, constructor & destructor)
Oop lec 5-(class objects, constructor & destructor)Oop lec 5-(class objects, constructor & destructor)
Oop lec 5-(class objects, constructor & destructor)
 
34. uml
34. uml34. uml
34. uml
 
Oop objects_classes
Oop objects_classesOop objects_classes
Oop objects_classes
 
Constructors and Destructor in C++
Constructors and Destructor in C++Constructors and Destructor in C++
Constructors and Destructor in C++
 
Dbva dotnet programmer_guide_chapter8
Dbva dotnet programmer_guide_chapter8Dbva dotnet programmer_guide_chapter8
Dbva dotnet programmer_guide_chapter8
 
C++ oop
C++ oopC++ oop
C++ oop
 
Joel Landis Net Portfolio
Joel Landis Net PortfolioJoel Landis Net Portfolio
Joel Landis Net Portfolio
 
Dependency injection crash course
Dependency injection crash courseDependency injection crash course
Dependency injection crash course
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una Daly
 
Introduction to database-Formal Query language and Relational calculus
Introduction to database-Formal Query language and Relational calculusIntroduction to database-Formal Query language and Relational calculus
Introduction to database-Formal Query language and Relational calculus
 
SH 1 - SES 8 - Stitch_Overview_TLV.pptx
SH 1 - SES 8 - Stitch_Overview_TLV.pptxSH 1 - SES 8 - Stitch_Overview_TLV.pptx
SH 1 - SES 8 - Stitch_Overview_TLV.pptx
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-i
 
Service Oriented Architecture in Magento 2
Service Oriented Architecture in Magento 2Service Oriented Architecture in Magento 2
Service Oriented Architecture in Magento 2
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDB
 
Oracle ADF Quick Handy Reference
Oracle ADF Quick Handy ReferenceOracle ADF Quick Handy Reference
Oracle ADF Quick Handy Reference
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxMasterG
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfAnubhavMangla3
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...SOFTTECHHUB
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 

Último (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 

W5_Modeling Design Diagram (2) - OBJECT ORIENTED DESIGN.pptx

  • 1. ITB6006 Object-Oriented Design Week 5 – Modeling Design Diagram
  • 2. Lesson Plan 5min Attendance , Welcome , lesson Overview 20 min Stage1: Design Class Diagram 20 min Stage2: Enterprise Architect Activity develop formal sequence diagram 20 min Stage3 : Business Case 30 min Stage4 : Enterprise Architect Activity develop design class diagram 5 min Summary ITB6006 Object-Oriented Design
  • 3. Topic • What is a design class diagram? • What is the usefulness of a design class diagram? • How to derive it from other diagrams? • Organize Classes with Package Diagram ITB6006 Object-Oriented Design
  • 4. Software Design • Software Design determines the software architecture specifying the subsystems , relationships, subsystems’ functions, interfaces, look and feel of GUI. ITB6006 Object-Oriented Design deployment Deployment View InterfaceLayer «executionEnvironm... Controller Layer «executionEnviron... Database Layer User «device» Software Controller «executionEnviron... Business Object Layer Responsible for interacting with the User/Devices Responsible for Executing Business Processes Responsible for Executing Functions of Individual Business Objects Responsible for Storing /Retrieving Objects from a Database Requests Requests Requests «flow» Requests Requests N-Tier Architecture
  • 5. What is a design class diagram? • A UML diagram derived from behavioral and domain models. • A blueprint to facilitate implementation, testing and integration • Contains all the classes, attributes, relationships (Generalizations→ inheritance, aggregations → composition and associations → usage), operations needed to satisfy the requirements ITB6006 Object-Oriented Design
  • 6. Usefulness • Brings together the most significant artifacts in one diagram • facilitates quality measurement and assurance • effort estimation • work allocation ITB6006 Object-Oriented Design
  • 7. Business Case • In a library management System (LIS) you have 2 requirements • Req1. LIS must allow a client to check out documents • Req2. LIS must allow a client to return document • A Scenario is developed to describe a list of interactions for req1 • A sequence diagram is generated and tweaked to reflect the interactions ITB6006 Object-Oriented Design
  • 8. sd 1_Basic_Path customer :customer :Checkout Page :Home Page :CheckoutController :DBmgr d :Document l :Loan alt «click checkout» Displays Checkout Page () «document numbers» 1.msg:checkout(docNo:String) :String 2.d:getDocument(docNo:String) :Document returns the document d () returns the document() [d!=null]:3. creates Loan (c:customer, d:Document) 4.save(l:Loan) 5.setAvailable(false:boolean) 6.save(d:Document) 7. msg:"Checkout Successful"() ITB6006 Object-Oriented Design Formal Messages: Action →function call Data or object required → parameters If function returns result → variable (more than one additional calls to get functions are required) Decide parameter type a:A Decide return value type x:function (a:A):X
  • 9. Deriving Formal Messaging ITB6006 Object-Oriented Design sd Sequence Rules Subject Object Acted on action + other data/objects() return value() sd Formal Messages Subject Object Acted on returnvalue:action(otherdata/objects) sd Formal Messages LoginController loginPage verification__result:=verify(uid, passowrd) sd Sequence Rules loginPage LoginController verify uid, password() verification result() General Conversion Conversion Example
  • 10. ITB6006 Object-Oriented Design sd Sequence Rules Document CheckoutController set available to false() sd Formal Messages CheckoutController Document setAvailable(false) sd Sequence Rules CheckoutController CheckoutPage DBMgr check document with doc no() get document() d() sd Formal Messages CheckoutController CheckoutPage DBMgr msg:checkout(docNo:string) :string d:getDocument(docNo:string) :Document
  • 11. Formally Specified Sequence Diagram ITB6006 Object-Oriented Design sd 1_Basic_Path customer :customer :Checkout Page :Home Page :CheckoutController :DBmgr d :Document l :Loan :Msg alt «click checkout» Displays Checkout Page () 1.msg:checkout(docNo:String) :String create() «document numbers» 2.d:getDocument(docNo:String) :Document [d!=null]:3. creates Loan (c:customer, d:Document) 4.save(l:Loan) 5.setAvailable(false:boolean) 6.save(d:Document) 7. msg:"Checkout Successful"() add("Checkout Success: {0}", d)
  • 12. Identify Classes from Sequence Diagrams • Classes of Objects that sends and receives messages are 5 types : GUI, Controller, DB Manager, Other classes • Classes of Objects that are passed as parameters to a function call • Classes that serve as return types • Classes from Domain Model ITB6006 Object-Oriented Design
  • 13. Denoting Accessors • Due to encapsulation hiding including all getters and setters will cause the design diagram to look crowded • Unordinary getters and setters must be denoted Ex. Database Manager class get and set operations getX():X, getY():Y ,…,where X and Y are class names ITB6006 Object-Oriented Design
  • 14. sd 1_Basic_Path A :A B :B x= m(...) :X Identify methods from Sequence Diagrams Message denoted as x:=m():X Sent from object A to object B A calls the m(…) function of B A saves the result in variable x of type X ex.d:=getDocument(callNo:string) :Document ex. save(l:loan) ex. save (d:Document) ITB6006 Object-Oriented Design class Class Model B + x:m() :X
  • 15. Identify Attributes from Sequence Diagrams • Attributes are scalar types not objects class types • Identified from messages or methods that • retrieve objects • Is ordinary get and set ex. get(docNo) • Ex. Is Available ():boolean , set Available(b:boolean) where Available is an adjective • compute ex. calculateArea ():int • Are constructors: ex. create document ( docNo:string , title: string, author:string) ITB6006 Object-Oriented Design
  • 16. Identify relationships • Identify create from calls to constructors ex. A creates object of B ex. CheckoutController creates Loan • Identify use relationship from parameters ex. A uses B in a function call • Object of A passes an object of B as a parameter ex. DBMgr save (d:Document) ex. DBMgr save (l:loan) • Object of class A receives and object of class B as a return value ex. D:=getDocument (docNo:String):Document // from checkoutcontroller to the Document ITB6006 Object-Oriented Design
  • 17. Identify relationships • Identify call relationships ex. Object of class A calls a method in B ex. CheckoutGUI calls Checkout Controller • Identify aggregation , inheritance from Domain Model ITB6006 Object-Oriented Design
  • 18. Review Design Class Diagram • Ensure that the classes , attributes, operations, parameter types, return types, return types, relationships …are derived correctly • Does the diagram contains unnecessary classes? ITB6006 Object-Oriented Design
  • 19. Review Design Class Diagram • Ensure that the classes , attributes, operations, parameter types, return types, return types, relationships …names are easy to understand ITB6006 Object-Oriented Design
  • 20. Organize Classes with Package Diagram • Common organization • Functional • Architectural Style • Hybrid Organization ITB6006 Object-Oriented Design Ex. Library Functional Subsystems Circulation: Document, Loan, Client, CirculationController ...etc Cataloguing: Catalog, Subject.. CataloguingController…etc. Purchasing: Order, Request, PurchasingController…etc Loan User Assistance Ex. Library Architectural Subsystems Presentation: GUI Controller: CirculationController , …etc. Business Objects: Document, Loan…etc. Database: DBMgr, Storage Objects…etc. Network: Network communication classes.
  • 21. Class Activity7 Modeling - 20Minutes ITB6006 Object-Oriented Design
  • 22. Refresher on Moodle and Questions? ITB6006 Object-Oriented Design

Notas del editor

  1. Scenario Customer Clicks on CheckoutDocument Button on the Home Page Home Page Displays Checkout Page Customer enters the Doc numbers of documents to be checked out and clicks the submit button on Checkout Page Checkout Page calls checkout(Doc No:String) of CheckoutController CheckoutController calls getDocument(callNo:String) of DBmgr DBmgr returns the document d to CheckoutController CheckoutController creates Loan CheckoutController calls save(l:Loan) of DBmgr CheckoutController calls setAvailable(false:boolean) of Document CheckoutController calls save(d:Document) of DBmgr CheckoutController displays a confirmation msg "Checkout Successful" to the Checkout Page Checkout Page displays msg toThe Customer Customer sees the msg
  2. In this case 2 objects are interacting and parameter are required a return value is introduced
  3. In this case 3 objects are interacting and a parameter is required one of the messages is a function call and the other is the function itself
  4. Download EA Exercise from Moodle