java software solutions lewis and loftus chapter 15 copyright 1997 by john lewis and william loftus....

Post on 18-Jan-2016

213 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 1

Java Software Solutions Lewis and Loftus

Software Development Process II -- Introduction

• We now extend the process established in Chapter 11 to include more object-oriented issues

• Chapter 15 focuses on:

– evolutionary development– object-oriented design and implementation– Slide Puzzle problem

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 2

Java Software Solutions Lewis and Loftus

An Iterative Development Process

• Recall from Chapter 11 our simple process model:

Establishrequirements

Createdesign

Implementcode

Testsystem

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 3

Java Software Solutions Lewis and Loftus

An Evolutionary Development Model

• Divide the process of design into

– architectural design - primary classes and interaction– detailed design - specific classes, methods, and

algorithms

• Create a refinement cycle

• Each refinement focuses on one aspect of the system

• As each refinement is addressed, the system evolves

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 4

Java Software Solutions Lewis and Loftus

An Evolutionary Development Model

Establish requiremens

Architectural design

Establish refinement

scope

Unit and integration

test

Implementation

System test

Identify classes & objects

Identify relationships

Detailed design

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 5

Java Software Solutions Lewis and Loftus

Refinement Cycle

• Establish refinement scope

• Define the specific nature of the next refinement

• Such as:

– user interface– a particular algorithm– a particular requirement

• Choosing the most appropriate next refinement is important and requires experience

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 6

Java Software Solutions Lewis and Loftus

Refinement Cycle

• Identifying classes and objects

• The ones that relate to the current refinement

• Can often define by focusing on the roles they play in the system

• Consider reusing existing classes

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 7

Java Software Solutions Lewis and Loftus

Refinement Cycle

• Identifying relationships

• Inheritance (is-a) relationships

• The uses relationship establishes another kind of bond between classes

• Class A uses class B in some way

• Can express cardinality

• Example: A Car has (uses) four wheels

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 8

Java Software Solutions Lewis and Loftus

Refinement Cycle

• Detailed design, implementation and test

• Design of specific methods and their translation into code

• A unit test focuses on one particular component, such as a method or class

• An integration test focuses on the interaction between components

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 9

Java Software Solutions Lewis and Loftus

Slide Puzzle

• As we did in Chapter 11, let’s explore a larger example

• Slide Puzzle

– square board of tiles– user shifts tiles one at a time– goal is a particular configuration

• We will use simple numbers as the tile faces, though it is often done with pictures

• The design should take this potential modification into account

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 10

Java Software Solutions Lewis and Loftus

Slide Puzzle

• Architectural design

User interface

Board manager

Movement control

Board actions

Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 11

Java Software Solutions Lewis and Loftus

Slide Puzzle

• User interface

Solve Reshuffle

1

4

7

2 3

5 6

8

top related