+ All Categories
Home > Documents > CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented...

CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented...

Date post: 05-Nov-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
20
CSSE 374: Introduction to Object- Oriented Analysis and Design Shawn Bohner Office: Moench Room F212 Phone: (812) 877-8685 Email: [email protected] Q1
Transcript
Page 1: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

CSSE 374: Introduction to Object-Oriented Analysis and

Design Shawn Bohner Office: Moench Room F212 Phone: (812) 877-8685 Email: [email protected]

Q1

Page 2: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Learning Outcomes: O-O Design

Demonstrate object-oriented design basics like domain models, class diagrams, and interaction (sequence and communication) diagrams.   Understand OOA to OOD

transition   Examine elaboration & refinement in design   Walkthrough OOD example   Explain model structure for UML

http://enterprisegeeks.com/blog/2009/07/

Page 3: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

As we discussed yesterday, design organizes things for implementation. So, what makes software design different than other engineering disciplines?

  Again, think for 15 seconds…   Turn to a neighbor and discuss

it for a minute

Page 4: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Why is Software Design Important?

  Size

  Complexity

  Constraints

  Performance

  Communication

Needs, Features, & Requirements

Q2

Page 5: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Thinking at the Right Level

  Abstraction - hiding irrelevant details to focus attention at right level

  Process of component identification is top-down, decomposing the system into successively smaller, less complex components

  Process of integration, which is bottom-up, building (composing) the target system by combining components in useful ways

©2000-2002 McQuain WD & Keller BJ"Q3

Page 6: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Elaboration and Refinement…

  Starting with Abstract Requirements   Successively Elaborate and

Refine them into specifications, models, and ultimately implementation

©2005 Shawn Bohner"

Page 7: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Key Questions for Object-Oriented Design

1.  What classes do we get from the application domain?

2.  How should responsibilities be allocated to classes?

3.  What classes should do what? 4.  How should objects collaborate?

Responsibility-Driven Design

Guided by design patterns

Q4

Page 8: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Topics Covered in Book

Topics and Skills

UML notation

Requirements analysis

Principles and guidelines

Patterns

Iterative development with an agile Unified

Process

OOA/D

http://www.craiglarman.com/wiki/images/4/43/Craig_larman_head.JPG Q5

Page 9: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Assigning responsibilities to software objects is a critical ability in Object-Oriented development. Why?

Q6

  Again, think for 15 seconds…   Turn to a neighbor and discuss

it for a minute

Page 10: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Analysis versus Design

  Analysis   Investigation of the problem

and requirements, rather than a solution

 Do the right thing…

  Design  A conceptual solution,

rather than its implementation   Excludes low level details

 Do the thing right…

Q7

O-O Design

Classes/Objects

Operations/Methods

Data/Attributes

Patterns

Page 11: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Analysis and Design Concepts

Plane

tailNumber

public class Plane{private String tailNumber;

public List getFlightHistory() {...}}

domain conceptvisualization of domain concept

representation in an object-oriented programming language

Analysis Concept Design Concept

Page 12: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Grady Booch

Ivar Jacobson Jim Rumbaugh

Unified Modeling Language (UML)

Page 13: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Let’s do a Quick Example: Dice   Define Use Cases

 Play a dice game: Players requests to roll the dice. System presents results: If the dice face value totals seven, player wins; otherwise player loses

  Define a Domain Model

  Assign Object Responsibilities, Draw Interaction Diagrams

  Define Design Class Diagrams

Page 14: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Domain Model for a Dice Game

Player

name

DiceGame

Die

faceValueRolls

Plays

Includes

2

2

1

1

1

1

Page 15: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Sequence Diagram for Play Dice Game

Page 16: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Design Class Diagram for Dice Game

2

Die

faceValue : int

getFaceValue() : introll()

DiceGame

die1 : Diedie2 : Die

play()

1

How does it differ from the domain model?

Q8

Page 17: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Three Perspectives to Apply UML

  Conceptual perspective (Sketch)

  Software specification perspective (Blueprint)

  Software implementation perspective (Executable programming language)

Q9

Page 18: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Abstract Requirements to Concrete Systems

Abstract Requirements

Concrete Implementation

Computational Independent

Model

Platform Independent

Model

Platform Specific Model

©2005 Shawn Bohner"

Analysis/ Conceptual

Classes (Domain Model)

Software Classes

(Design Class Diagrams)

Implementation Classes

(Language)

Page 19: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

The Case Studies   NextGen Point of Sale (POS) System

  Monopoly Game

  The case study is organized in three iterations

 Each iteration conducts analysis and design on the features for that current software release

Page 20: CSSE 374: Introduction to Object- Oriented Analysis and Design · Key Questions for Object-Oriented Design 1. What classes do we get from the application domain? 2. How should responsibilities

Homework Assignment for 12/2/10

  Read Chapters 9 through page 148   Milestone 1

 Set up weekly meetings  Compile CSSE 371 requirements artifacts

into a single, organized document as a starting point.

 Establish Engineering Journal  Due by 11:59pm on Friday, December 3rd,

2010


Recommended