chapter16 component design rpl

Upload: pajar-septianto

Post on 02-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Chapter16 component design RPL

    1/8

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Chapter 16Component-Level Design

  • 8/10/2019 Chapter16 component design RPL

    2/8

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Component-Level Design

    the closest design activity to codingthe approach:

    review the design description for thecomponent

    use stepwise refinement to develop algorithm

    use structured programming to implementprocedural logic

    use formal methods to prove logic

  • 8/10/2019 Chapter16 component design RPL

    3/8

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Stepwise Refinement

    open

    walk to door;

    reach for knob;

    open door;

    walk through;

    close door.

    repeat until door opens

    turn knob clockwise;

    if knob doesn't turn, then

    take key out;

    find correct key;

    insert in lock;

    endif

    pull/push doormove out of way;

    end repeat

  • 8/10/2019 Chapter16 component design RPL

    4/8

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    The Component-LevelDesign Model

    represents the algorithm at a level of detailthat can be reviewed for quality

    options:graphical (e.g. flowchart, box diagram)

    pseudocode (e.g., PDL) ... choice of many

    programming language

    decision table

    conduct walkthrough to assess quality

  • 8/10/2019 Chapter16 component design RPL

    5/8

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Structured Programmingfor Procedural Design

    uses a limited set of logical constructs:sequencecondi t ional if-then-else, select-casel oops do-while, repeat until

    leads to more readable, testable code

    important for achieving high quality,but not enough

  • 8/10/2019 Chapter16 component design RPL

    6/8

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    A Structured Procedural Design

    a

    x1

    x2b

    3x

    4

    5

    c

    d

    ef

    g

    x

    x

    add a condition Z,if true, exit the program

  • 8/10/2019 Chapter16 component design RPL

    7/8

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Program Design Language (PDL)

    if-then-else

    if condition xthen process a;

    else process b;endif

    PDL

    easy to combine with source code

    machine readable, no need for graphics input

    graphics can be generated from PDL

    enables declaration of data as well as procedure

    easier to maintain

  • 8/10/2019 Chapter16 component design RPL

    8/8

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Why Design Language?

    can be a derivative of the HOL of choice

    e.g., Ada PDL

    machine readable and processable

    can be embedded with source code,therefore easier to maintain

    can be represented in great detail, ifdesigner and coder are different

    easy to review