27
Slide 12.1 © The McGraw-Hill Companies, 2002 1 Software Engineering Lecture 7 Systems Analysis Object-Oriented Design

Lecture 7 Systems Analysis Object-Oriented Design

Embed Size (px)

DESCRIPTION

Software Engineering. Lecture 7 Systems Analysis Object-Oriented Design. Project Work. Requirements Document  Done! Perform Systems Analysis Create Analysis Document Create Design Document Create Prototype Project Done!. Analysis Specification Document. Page 46 of the Class Notes - PowerPoint PPT Presentation

Citation preview

Page 1: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.1

© The McGraw-Hill Companies, 2002

1

Software Engineering

Lecture 7

Systems Analysis

Object-Oriented Design

Page 2: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.2

© The McGraw-Hill Companies, 2002

22

Project Work

• Requirements Document Done!• Perform Systems Analysis• Create Analysis Document• Create Design Document• Create Prototype• Project Done!

Page 3: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.3

© The McGraw-Hill Companies, 2002

33

Analysis Specification Document

• Page 46 of the Class Notes• The Analysis Document Contains

– 1. Introduction section» Specific Project Objectives» Overall Requirements Description» Project Constraints and Assumptions

– 2. Functional Requirements» ERD» DFD» Process Descriptions» Design Specification Description» Performance and Reliability Requirements» UML Diagrams (Component Diagrams)» Test Plan

Page 4: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.4

© The McGraw-Hill Companies, 2002

44

Structure Analysis Phase

Previously Covered…

• Entity Relations shown in ERD format • Data Flow shown in DFD format• Data, Actions and Entities are separated for clarity

Page 5: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.5

© The McGraw-Hill Companies, 2002

55

Structure Analysis vs. Object-Oriented Design

Object Oriented Analysis and Design

– Uses Structured Analysis» Uses visual representation similar to Structured

Analysis» Diagramming builds from ERD and DFD concepts

– Easy to learn– UML standards use common sense

Page 6: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.6

© The McGraw-Hill Companies, 2002

66

Object-Oriented Analysis Phase

• Object-Oriented Design Methodology

– Reaction to perceived shortcomings in structured analysis– The problem of larger products– Data and action are treated as equal partners

Page 7: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.7

© The McGraw-Hill Companies, 2002

77

Object-Oriented Analysis

• Object consists of– Data (attributes, state variables, instance variables, fields, data

members), and– Actions (methods, member functions)

• Objects are independent units– Conceptual independence– Physical independence

Page 8: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.8

© The McGraw-Hill Companies, 2002

88

Different OO Methods

• Many different methods exist – Booch– OMT– Objectory– Shlaer-Mellor– Coad-Yourdon

• All are essentially equivalent• Nowadays, we represent OOA using UML (Unified

Modeling Language)

Page 9: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.9

© The McGraw-Hill Companies, 2002

99

The Three Steps of OOA

• 1. Use-case modeling– Determine how the various results are computed by the product

(without regard to sequencing)– Largely action-oriented

• 2. Class modeling (“object modeling”)– Determine the classes and their attributes– Purely data-oriented

• 3. Dynamic modeling – Determine the actions performed by or to each class– Purely action-oriented

• The process is iterative

Page 10: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.10

© The McGraw-Hill Companies, 2002

1010

Elevator Problem: OOA

• 1. Use-Case Modeling– Use case: Generic description of overall functionality

– Scenario: Instance of a use case• Get comprehensive insight into behavior of product

Page 11: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.11

© The McGraw-Hill Companies, 2002

1111

Use CASE Scenario

Page 12: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.12

© The McGraw-Hill Companies, 2002

1212

Class Modeling

• Extract classes and their attributes• Represent them using an entity-relationship diagram• Deduce the classes from use cases and their scenarios• Often there are many scenarios

Page 13: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.13

© The McGraw-Hill Companies, 2002

1313

Two Approaches to Class Modeling

• Noun extraction– Always works

• CRC cards– Need to have domain expertise

Page 14: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.14

© The McGraw-Hill Companies, 2002

1414

Noun Extraction

• Concise Problem Definition– Define product in single sentence

» Buttons in elevators and on the floors control the motion of n elevators in a building with m floors.

Page 15: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.15

© The McGraw-Hill Companies, 2002

1515

Noun Extraction

• Identify nouns in the informal strategy• Nouns

– button, elevator, floor, movement, building, illumination, request, door

– floor, building, door are outside problem boundary — exclude– movement, illumination, request are abstract nouns — exclude (they

may become attributes)• Create classes: Elevator and Button

Page 16: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.16

© The McGraw-Hill Companies, 2002

1616

First Iteration of Class Diagram

• Problem– Buttons do not communicate directly with elevators– We need an additional class: Elevator Controller

Page 17: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.17

© The McGraw-Hill Companies, 2002

1717

Second Iteration of Class Diagram

Page 18: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.18

© The McGraw-Hill Companies, 2002

1818

Third Iteration of Class Diagram

Page 19: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.19

© The McGraw-Hill Companies, 2002

1919

Why is Iteration Needed?

• Perhaps the method is not yet mature?– Waterfall model (explicit feedback loops)– Rapid prototyping model (aim: to reduce iteration)– Incremental model (explicit iterative approach)– Spiral model (explicit iterative approach)

• Iteration is a property of all software production– Especially for medium- and large-scale products– Expect iteration in the object-oriented paradigm

Page 20: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.20

© The McGraw-Hill Companies, 2002

2020

CRC Cards

• Used since 1989 for OOA• For each class, fill in card showing

– Name of Class– Functionality (Responsibility)– List of classes it invokes (Collaboration)

• Strength– When acted out by team members, CRC cards are a powerful

tool for highlighting missing or incorrect items

• Weakness– Domain expertise is needed

Page 21: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.21

© The McGraw-Hill Companies, 2002

2121

Example CRC Cards

Page 22: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.22

© The McGraw-Hill Companies, 2002

2222

Dynamic Modeling

• Produce UML state diagram

• State, event, predicate are distributed over the state diagram

Page 23: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.23

© The McGraw-Hill Companies, 2002

2323

State Diagram

Page 24: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.24

© The McGraw-Hill Companies, 2002

2424

Modeling Tools

• SmartDraw, 30-day trial version is available for FREE: http://www.smartdraw.com/

• Microsoft Visio• System Architect• CASE Tools• Many other drawing tool

Page 25: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.25

© The McGraw-Hill Companies, 2002

2525

SmartDraw Software Design Option

1 2

3

Page 26: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.26

© The McGraw-Hill Companies, 2002

2626

SmartDraw Components & Symbols

Page 27: Lecture 7 Systems Analysis Object-Oriented Design

Slide 12.27

© The McGraw-Hill Companies, 2002

2727

Project Work

• Work in your teams to create your Analysis Document

• Next time we will discuss UML and OOD in more detail.