Software Development Process II - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Software Development Process II

Description:

Tile ... Board tiles = new Board(); Panel buttons = new Panel(); Button solve ... class Tile. 11/9/09. Komar Associates. 19. Slider Code (cont'd) class ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 22
Provided by: joseph120
Category:

less

Transcript and Presenter's Notes

Title: Software Development Process II


1
Software Development Process II
  • Joe Komar

2
Iterative Process Model
3
Evolutionary Development
Refinement Cycle
4
Evolutionary 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.

5
Establish 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

6
Identify 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

7
Identify 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

8
Detailed 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)

9
Implementation
  • 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

10
Unit 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

11
Slider Example
  • Architectural Design

User Interface
Movement Control
Board Manager
Board Actions
12
Possible 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.

13
User 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

14
Class Diagram for Slider User Interface
1
2
1
9
15
Slider 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")
16
Slider 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
17
Slider 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
18
Slider Code (contd)
public Dimension getMinimumSize() return
new Dimension (SIZE, SIZE) // method
getMinimumSize public Dimension
getPreferredSize() return
getMinimumSize() // method
getPreferredSize // class Tile
19
Slider 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
20
Slider Output
21
Evolutionary 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
Write a Comment
User Comments (0)
About PowerShow.com