SlideShare a Scribd company logo
1 of 68
Lecture 5-6-7: Object-Oriented Design CSCI-383 Object-Oriented Programming & Design Ji Ruan 2009/09/23-25-28 StFX University, Canada
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object]
Why Start with Design? ,[object Object],[object Object]
Programming in the Small and in the Large ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Basis for Design ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Responsibility-Driven Design (RDD) ,[object Object],[object Object],[object Object],[object Object]
Directed Evolution ,[object Object],[object Object],[object Object],[object Object],[object Object]
An Example, the IIKH  ,[object Object],[object Object],[object Object]
Your Job Your job is to develop the software that will implement the IIKH.
Abilities of the IIKH ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Characterization by Behavior ,[object Object],[object Object],[object Object],[object Object],[object Object]
Working Through Scenarios ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Software Components ,[object Object],[object Object],[object Object],[object Object]
CRC Cards: Recording Responsibility ,[object Object],[object Object],[object Object],[object Object]
Different Components ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Component 1: The Greeter ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Component 1: The Greeter CRC card for the Greeter:
Component 2: The Recipe Database ,[object Object],[object Object],[object Object],[object Object],[object Object]
The Who/What Cycle ,[object Object],[object Object],[object Object],[object Object]
Postponing Decisions ,[object Object],[object Object],[object Object],[object Object],[object Object]
Component 3: The Recipe ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Component 4: The Planner ,[object Object],[object Object],[object Object],[object Object]
Component 5: The Date ,[object Object],[object Object],[object Object],[object Object]
Component 6: The Meal ,[object Object],[object Object],[object Object],[object Object]
The Six Components ,[object Object],[object Object]
Interaction Diagrams The picture on the previous slide captures static relationships, but not the dynamic flow of messages in a senario. That information can be recorded by an interaction diagram.
Unified Modeling Language (UML) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Goals of UML ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Why use UML? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standardization ,[object Object],[object Object]
History Of UML ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Diagrams Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Diagrams Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Behavior diagrams ,[object Object],[object Object],[object Object]
Use case diagram ,[object Object],[object Object],[object Object],[object Object]
Use case diagram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Activity diagram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Activity diagram Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
State Diagram ,[object Object],[object Object],[object Object],[object Object]
State Diagram ,[object Object],[object Object],[object Object],[object Object],[object Object]
State Diagram An Example: Order object
UML Diagrams Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Interaction diagram ,[object Object],[object Object],[object Object],[object Object],[object Object]
Interaction diagram ,[object Object],[object Object],[object Object]
Interaction diagram ,[object Object],[object Object],[object Object]
Activity vs. State vs. Interaction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Characteristics of Components ,[object Object],[object Object],[object Object],[object Object],[object Object]
Behavior and State ,[object Object],[object Object],[object Object],[object Object]
Instances and Classes There are likely many instances of recipe, but they will all behave in the same way. We say the behavior is common to the class Recipe.  Since earlier our goal was to identify behavior, we ignored this distinction and concentrated on prototypical objects.
Coupling and Cohesion ,[object Object],[object Object],[object Object]
Interface and Implementation ,[object Object],[object Object]
Two views of a Software System ,[object Object],[object Object]
Parnas' Principles ,[object Object],[object Object],[object Object]
Public and Private View ,[object Object],[object Object],[object Object]
Formalize the Interface ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Names Selection ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Documentation ,[object Object],[object Object]
User Manual ,[object Object],[object Object],[object Object],[object Object]
Quality ,[object Object],[object Object]
System Design Documentation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Preparing for Change ,[object Object],[object Object],[object Object],[object Object],[object Object]
Next Step - Select Representations for Subsystems ,[object Object],[object Object],[object Object]
Step - Implement and Test Subsystems ,[object Object],[object Object],[object Object],[object Object],[object Object]
Step - Integration and Testing ,[object Object],[object Object],[object Object]
Maintainence and Evolution ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common Design Flaws ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],Assignment 3:
About these slides ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

Similar to CSCI-383 Lecture 5-6-7: Object-Oriented Design

Chen's second test slides again
Chen's second test slides againChen's second test slides again
Chen's second test slides again
Hima Challa
 
A simple test paper from Chen
A simple test paper from ChenA simple test paper from Chen
A simple test paper from Chen
techweb08
 
Chen's second test slides
Chen's second test slidesChen's second test slides
Chen's second test slides
Hima Challa
 
A simple test paper from Chen
A simple test paper from ChenA simple test paper from Chen
A simple test paper from Chen
techweb08
 
A simple test paper from Chen
A simple test paper from ChenA simple test paper from Chen
A simple test paper from Chen
techweb08
 
COMPUTER APPLICATION PROJECT ON
COMPUTER APPLICATION PROJECT ON COMPUTER APPLICATION PROJECT ON
COMPUTER APPLICATION PROJECT ON
Jitender Suryavansh
 

Similar to CSCI-383 Lecture 5-6-7: Object-Oriented Design (20)

Software design.edited (1)
Software design.edited (1)Software design.edited (1)
Software design.edited (1)
 
Quality Software Development
Quality Software DevelopmentQuality Software Development
Quality Software Development
 
Flutter App Performance Optimization_ Tips and Techniques.pdf
Flutter App Performance Optimization_ Tips and Techniques.pdfFlutter App Performance Optimization_ Tips and Techniques.pdf
Flutter App Performance Optimization_ Tips and Techniques.pdf
 
Chen's second test slides again
Chen's second test slides againChen's second test slides again
Chen's second test slides again
 
A simple test paper from Chen
A simple test paper from ChenA simple test paper from Chen
A simple test paper from Chen
 
Chen's second test slides
Chen's second test slidesChen's second test slides
Chen's second test slides
 
A simple test paper from Chen
A simple test paper from ChenA simple test paper from Chen
A simple test paper from Chen
 
A simple test paper from Chen
A simple test paper from ChenA simple test paper from Chen
A simple test paper from Chen
 
Software Reusability
Software ReusabilitySoftware Reusability
Software Reusability
 
Software engineering introduction
Software engineering introductionSoftware engineering introduction
Software engineering introduction
 
Part1
Part1Part1
Part1
 
From Use to User Interface
From Use     to User InterfaceFrom Use     to User Interface
From Use to User Interface
 
Required computer skills program devlopment
Required computer skills program devlopmentRequired computer skills program devlopment
Required computer skills program devlopment
 
Fulltext01
Fulltext01Fulltext01
Fulltext01
 
How To Plan a Software Project
How To Plan a Software ProjectHow To Plan a Software Project
How To Plan a Software Project
 
Lecture1422914635
Lecture1422914635Lecture1422914635
Lecture1422914635
 
PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
 
Ch17
Ch17Ch17
Ch17
 
How Custom Software Development is Transforming the Traditional Business Prac...
How Custom Software Development is Transforming the Traditional Business Prac...How Custom Software Development is Transforming the Traditional Business Prac...
How Custom Software Development is Transforming the Traditional Business Prac...
 
COMPUTER APPLICATION PROJECT ON
COMPUTER APPLICATION PROJECT ON COMPUTER APPLICATION PROJECT ON
COMPUTER APPLICATION PROJECT ON
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

CSCI-383 Lecture 5-6-7: Object-Oriented Design

  • 1. Lecture 5-6-7: Object-Oriented Design CSCI-383 Object-Oriented Programming & Design Ji Ruan 2009/09/23-25-28 StFX University, Canada
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Your Job Your job is to develop the software that will implement the IIKH.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Component 1: The Greeter CRC card for the Greeter:
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Interaction Diagrams The picture on the previous slide captures static relationships, but not the dynamic flow of messages in a senario. That information can be recorded by an interaction diagram.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. State Diagram An Example: Order object
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49. Instances and Classes There are likely many instances of recipe, but they will all behave in the same way. We say the behavior is common to the class Recipe. Since earlier our goal was to identify behavior, we ignored this distinction and concentrated on prototypical objects.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.

Editor's Notes

  1. Reasons 1. These methods were already evolving toward each other independently. It made sense to continue that evolution together rather than apart, eliminating the potential for any unnecessary and gratuitous differences that would further confuse users. 2. By unifying the semantics and notation, they could bring some stability to the object-oriented marketplace, allowing projects to settle on one mature modeling language and letting tool builders focus on delivering more useful features. 3. They expected that their collaboration would yield improvements in all three earlier methods, helping them to capture lessons learned and to address problems that none of their methods previously handled well.