Title: Software Development Process II
1Software Development Process II
2Iterative Process Model
3Evolutionary Development
Refinement Cycle
4Evolutionary Development
- Architectural design establishes overall
guidelines for any part of the software system - Refinement cycle focuses on one aspect of the
overall program -- e.g., user interface, action
listeners, etc. - Needed design modifications are discovered early
on - Many refinement cycles can proceed in parallel
- OO programming fits well -- modularity, stubs,
abstraction, etc.
5Establish Refinement Scope
- Tradeoff resources available and the complexity
of the program - Examples
- User interface
- Output results
- Flesh out a particular algorithm
- Develop a class library
- Can be relatively broad or very narrow
6Identify Classes and Objects
- Identify all known requirements and associate
with parts of the software -- roles and
responsibilities - Take a first cut at establishing classes and a
class hierarchy -- may very well be changed - Associate software with physical entities
whenever possible - Reuse existing classes and objects when possible
7Identify Relationships
- Group classes than have similar roles and common
behaviors (consider a parent class for these) - Interface relationship -- for multiple
inheritance and common functions - Package classes for the refinement
- The use relationship is appropriate when one
object just needs the services of another
8Detailed Design
- Identify all the public methods
- Scenario diagrams (e.g., use case) verifies what
methods are needed and what they need to do - Identify the use of other objects (data items,
etc.) and classes -- declared locally, passed as
a parameter, public, etc. - Details of algorithms to be used (pseudocode)
9Implementation
- Start coding
- Use standard coding style (efficient and easy to
read) - If difficult to code some aspects, need to
revisit the design - Code stubs where necessary
10Unit and Integration Testing
- Unit testing is testing of a particular class
instantiation - simulate the input to a particular method
- check the output for correctness
- New code is then integrated with previously
developed code and tested for proper execution - Again, results may mean revisiting the design of
the system
11Slider Example
User Interface
Movement Control
Board Manager
Board Actions
12Possible Refinements
- Develop User Interface
- Tile movement and mouse events
- Set up initial board (random arrangement of
pieces of the picture) - Restart puzzle or reshuffle existing
- Determine when solved and acknowledge it
- Produce final solution when requested
- etc.
13User Interface Requirements
- Accessible over the WWW
- 3 X 3 playing board with one position empty
- Control to reshuffle
- Control to see the puzzle in its solved
configuration
14Class Diagram for Slider User Interface
1
2
1
9
15Slider Code
import java.io. import java.awt. import
java.applet. public class Slider extends
Applet final static int SIZE 150
Board tiles new Board() Panel buttons new
Panel() Button solve new Button
("Solve") Button reshuffle new Button
("Reshuffle")
16Slider Code (contd)
public void init() buttons.add (solve)
buttons.add (reshuffle) add (tiles)
add (buttons) tiles.setup()
setSize (SIZE100,SIZE100) // method
init public void paint (Graphics page)
tiles.repaint() // method paint //
class Slider
17Slider Code (contd)
class Tile extends Canvas final private int
SIZE Slider.SIZE/3 private String title
Tile (String title1) title title1
// constructor Tile public void paint
(Graphics page) page.drawRect
(0,0,SIZE-2,SIZE-2) page.drawString
(title, SIZE/2, SIZE/2) // method paint
18Slider Code (contd)
public Dimension getMinimumSize() return
new Dimension (SIZE, SIZE) // method
getMinimumSize public Dimension
getPreferredSize() return
getMinimumSize() // method
getPreferredSize // class Tile
19Slider Code (contd)
class Board extends Panel private Tile
tiles new Tile ("1"), new Tile ("2"),
new Tile ("3"), new Tile ("4"), new Tile
("5"), new Tile ("6"), new Tile ("7"), new
Tile ("8"), new Tile ("") public void
setup() setLayout (new GridLayout (3,3))
// Create the 3x3 matrix for (int
number_of_tiles 0 number_of_tiles lt
tiles.length number_of_tiles)
add (tilesnumber_of_tiles) // method
setup // class Board
20Slider Output
21Evolutionary Development
- Key is to establish small enough refinement
scopes - To take into account programming resources
available - To have manageable chunks of coding
- To allow parallel development of code
- To be able to reuse code already developed
- To be able to test well