Graphical Design Notation
16.1.1 Graphical Design Notation
"A picture is worth a thousand words," but it's rather important to know which pic- ture and which 1000 words. There is no question that graphical tools, such as the flowchart or box diagram, provide useful pictorial patterns that readily depict proce- dural detail. However, if graphical tools are misused, the wrong picture may lead to the wrong software.
A flowchart is quite simple pictorially. A box is used to indicate a processing step.
A diamond represents a logical condition, and arrows show the flow of control. Fig- ure 16.1 illustrates three structured constructs. The sequence is represented as two processing boxes connected by an line (arrow) of control. Condition, also called if- then-else, is depicted as a decision diamond that if true, causes then-part processing to occur, and if false, invokes else-part processing. Repetition is represented using two slightly different forms. The do while tests a condition and executes a loop task repetitively as long as the condition holds true. A repeat until executes the loop task first, then tests a condition and repeats the task until the condition fails. The selec- tion (or select-case) construct shown in the figure is actually an extension of the
PA R T T H R E E C O N V E N T I O N A L M E T H O D S F O R S O F T WA R E E N G I N E E R I N G
F I G U R E 16.2
Nesting constructs
Else-part
First task
Condition
Next task Then-part Loop task
Loop condition
if-then-else. A parameter is tested by successive decisions until a true condition occurs and a case part processing path is executed.
The structured constructs may be nested within one another as shown in Figure
16.2. Referring to the figure, repeat-until forms the then part of if-then-else (shown Structured
programming enclosed by the outer dashed boundary). Another if-then-else forms the else part of constructs should
the larger condition. Finally, the condition itself becomes a second block in a sequence. make it easier to
By nesting constructs in this manner, a complex logical schema may be developed. It understand the design. should be noted that any one of the blocks in Figure 16.2 could reference another mod- If using them without “violation” results in
ule, thereby accomplishing procedural layering implied by program structure. unnecessary
In general, the dogmatic use of only the structured constructs can introduce inef- complexity, it’s
ficiency when an escape from a set of nested loops or nested conditions is required. OK to violate.
More important, additional complication of all logical tests along the path of escape can cloud software control flow, increase the possibility of error, and have a nega- tive impact on readability and maintainability. What can we do?
The designer is left with two options: (1) The procedural representation is redesigned so that the "escape branch" is not required at a nested location in the flow of control or (2) the structured constructs are violated in a controlled manner; that is, a con-
Both the flowchart and strained branch out of the nested flow is designed. Option 1 is obviously the ideal box diagrams no longer are used as
approach, but option 2 can be accommodated without violating of the spirit of struc- widely as they once
tured programming. were. In general, use
Another graphical design tool, the box diagram, evolved from a desire to develop them to document or
a procedural design representation that would not allow violation of the structured evaluate design in
specific instances, not constructs. Developed by Nassi and Shneiderman [NAS73] and extended by Chapin to represent an entire
[CHA74], the diagrams (also called Nassi-Shneiderman charts, N-S charts, or Chapin system.
charts) have the following characteristics: (1) functional domain (that is, the scope of
CHAPTER 16
COMPONENT-LEVEL DESIGN
F I G U R E 16.3
Box diagram
Condition constructs
First task
Next task
Next +1 task
Sequence
If-then-else
Loop condition Case condition
part Do-while-
Loop condition
Repetition
Selection
repetition or if-then-else) is well defined and clearly visible as a pictorial representa- tion, (2) arbitrary transfer of control is impossible, (3) the scope of local and/or global data can be easily determined, (4) recursion is easy to represent.
The graphical representation of structured constructs using the box diagram is illustrated in Figure 16.3. The fundamental element of the diagram is a box. To rep- resent sequence, two boxes are connected bottom to top. To represent if-then-else,
a condition box is followed by a then-part and else-part box. Repetition is depicted with a bounding pattern that encloses the process (do-while part or repeat-until part) to be repeated. Finally, selection is represented using the graphical form shown at the bottom of the figure.
Like flowcharts, a box diagram is layered on multiple pages as processing ele- ments of a module are refined. A "call" to a subordinate module can be represented within a box by specifying the module name enclosed by an oval.
Parts
» The Concurrent Development Model
» SUMMARY Software engineering is a discipline that integrates process, methods, and tools for
» PEOPLE In a study published by the IEEE [CUR88], the engineering vice presidents of three
» THE PROCESS The generic phases that characterize the software process—definition, development,
» THE PROJECT In order to manage a successful software project, we must understand what can go
» METRICS IN THE PROCESS AND PROJECT DOMAINS
» Extended Function Point Metrics
» METRICS FOR SOFTWARE QUALITY
» INTEGRATING METRICS WITHIN THE SOFTWARE PROCESS
» METRICS FOR SMALL ORGANIZATIONS
» ESTABLISHING A SOFTWARE METRICS PROGRAM
» Obtaining Information Necessary for Scope
» An Example of LOC-Based Estimation
» QUALITY CONCEPTS 1 It has been said that no two snowflakes are alike. Certainly when we watch snow
» SUMMARY Software quality assurance is an umbrella activity that is applied at each step in the
» R diagram 1.4 <part-of> data model; data model <part-of> design specification;
» SYSTEM MODELING Every computer-based system can be modeled as an information transform using an
» Facilitated Application Specification Techniques
» Data Objects, Attributes, and Relationships
» Entity/Relationship Diagrams
» Hatley and Pirbhai Extensions
» Creating an Entity/Relationship Diagram
» SUMMARY Design is the technical kernel of software engineering. During design, progressive
» Data Modeling, Data Structures, Databases, and the Data Warehouse
» Data Design at the Component Level
» A Brief Taxonomy of Styles and Patterns
» Quantitative Guidance for Architectural Design
» Isolate the transform center by specifying incoming and outgoing
» SUMMARY Software architecture provides a holistic view of the system to be built. It depicts the
» The User Interface Design Process
» Defining Interface Objects and Actions
» D E S I G N E VA L U AT I O N
» Testing for Real-Time Systems
» Organizing for Software Testing
» Criteria for Completion of Testing
» The Transition to a Quantitative View
» The Attributes of Effective Software Metrics
» Architectural Design Metrics
» Component-Level Design Metrics
» SUMMARY Software metrics provide a quantitative way to assess the quality of internal product
» Encapsulation, Inheritance, and Polymorphism
» Identifying Classes and Objects
» The Common Process Framework for OO
» OO Project Metrics and Estimation
» Event Identification with Use-Cases
» SUMMARY Object-oriented analysis methods enable a software engineer to model a problem by
» Partitioning the Analysis Model
» Designing Algorithms and Data Structures
» Program Components and Interfaces
» SUMMARY Object-oriented design translates the OOA model of the real world into an
» Testing Surface Structure and Deep Structure
» Deficiencies of Less Formal Approaches 1
» What Makes Cleanroom Different?
» Design Refinement and Verification
» SUMMARY Cleanroom software engineering is a formal approach to software development that
» Structural Modeling and Structure Points
» Describing Reusable Components
» SUMMARY Component-based software engineering offers inherent benefits in software quality,
» Guidelines for Distributing Application Subsystems
» Middleware and Object Request Broker Architectures
» An Overview of a Design Approach
» Consider expert Web developer will create a complete design, but time and cost can be appropriate
» A Software Reengineering Process Model
» Reverse Engineering to Understand Data
» Forward Engineering for Client/Server Architectures
» SUMMARY Reengineering occurs at two different levels of abstraction. At the business level,
Show more