Top Banner
Chapter 1 Introduction to Structured Design
50

Chapter 1 Introduction to Structured Design. Introduction System A combination of people, equipment, and procedures that work together to perform.

Jan 02, 2016

Download

Documents

Cecil Simpson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Chapter 1

Introduction to Structured Design

Page 2: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Introduction System

A combination of people, equipment, and procedures that work together to perform a specific function.

Manually operated Computer assisted

Computer-Based Information System A system in which some of the procedures are

performed by a computer.

Page 3: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

System Development Life Cycle System Development Life Cycle (SDLC)

A series of well-designed steps that should be followed when a system is created or changed.

Page 4: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Analyze the Current System System Analysts

Study every aspect of the existing system to get a clear understanding of what things are done and how.

Identifies any problems associated with the system. Most effective technique is to talk to users of the

system. Users

People who are directly involved with the system in their day-today activities.

Page 5: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Define the New System Requirements Specify what needs to be done, not how to do it.

Which changes are necessary to eliminate the problems identified in the initial analysis.

After the analyst works out all the requirements, prepare a report outlining these requirements for management.

Page 6: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Design the New System System Designer

uses the requirements defined in the preceding step as a basis for designing the new or modified system.

System Flowchart shows all the major inputs and outputs. No detail is given as to how the program actually

works.

Page 7: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Design the New System Computer-Assisted Software Engineering (CASE)

The automation of tools, methods, and procedures for system development.

Page 8: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Each of the programs called for in the system

design is constructed. Program Development Cycle (PDC)

Page 9: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Review the Program Requirements

If anything is unclear at this point, the programmer asks for more information from the system analyst who wrote the original requirement, from the system designer, or even from a future user of the program.

Page 10: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Develop the Program Logic

The actual processing steps within each program in the system are developed. Two common tools:

Program flowcharts Use symbols graphically depict the problem-solving logic within

a program. Pseudocode

Use English-language statements that describe the processing steps.

Page 11: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Program Flowchart and Pseudocode

Page 12: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Program Flowchart and Pseudocode cont.

Page 13: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Hierarchy Chart or Structure Chart

Shows the relationships among parts of a program. Each program part is called a module.

Page 14: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Structure Chart

Page 15: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Class diagrams are expressed in the Unified

Modeling Language, or UML.

Page 16: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sample Input Screen (Not User Friendly)

Page 17: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sample Input Screen (User-Friendly)

Page 18: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Graphical User Interface (GUI)

Presents information in an easy-to-use point-and-click fashion.

A programmer must be able to understand the steps in the design if modifications are required.

The person modifying the program may not be the one who wrote it originally.

The program logic must be clear and easy to follow.

Page 19: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Write the Program.

Procedure-oriented languages Focus on the specific steps in the problem-solving

process. Fourth-generation languages (4GLs) has become

common. Nonprocedural languages defines what needs to be

done, not how. Packages contain programming statements that can be

used alone or in combination (macros and programs) to accomplish a task more efficiently.

Page 20: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Event-driven program

Designed to respond to actions that occur when the program is executing.

The actions can be initiated by the computer or by a user.

Object-oriented languages Deal with classes and objects, which are instances of

those classes. Java and C++

CASE tools include basic tutorials and online help systems designed to help users, analyst, designers, and programmers use the applications and tools effectively.

Page 21: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Test and Debug the Program

Check for errors (bugs) and test with sample data to see if actual results match expected results.

Syntax errors The programmer does not follow the language rules.

Logic error Occurs when a step in the program logic is incorrect.

Every possible condition should be tested if feasible. Needs to be designed to handle invalid input data.

Page 22: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Unit Testing

Programs, modules, or classes that make up a system should first be tested individually.

System Testing, or Integration Programs, modules, or classes should be tested

together as a system.

Page 23: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Complete the Program Documentation

Documentation occurs throughout the program development cycle.

Technical reference needs to be created. User guides need to be created.

Good documentation cannot be overemphasized in its importance.

Page 24: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Implement the New System

Users are trained, and operating procedures are defined.

System documentation is reviewed, revised as necessary, and prepared in its final form.

New systems may be run concurrently with the existing (old) systems; the new system may completely replace the old system; or the new system may be phased in gradually.

Page 25: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Develop the New System Evaluate the New System

Is it meeting the required objectives? Parts of the system may have to be modified.

Page 26: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Structured Programming Structured programming

A technique that has proven to be very effective in solving problems as well as in modifying solutions.

Control structures The ability to express a problem solution using only

three basic patterns of logic. A paper by C. Bohm and B. Jacopini, in 1965, is proof

that the three structures are sufficient for programming.

Page 27: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Structured Programming Basic Control Structures

SIMPLE SEQUENCE Control Structure Execute instructions in a step-by-step, sequential

manner.

Page 28: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Structured Programming IFTHENELSE Control Structure

The computer's ability to make a decision.

Page 29: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Structured Programming DOWHILE Control Structure

The computer's ability to repeat a series of instructions. A series of repeated instructions is a loop.

Page 30: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Structured Programming Infinite Loop - there is no way out. Every loop must include a statement that defines how

many times to execute the loop steps or under what condition to continue or to stop the looping process.

Page 31: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Chapter 2

SIMPLE SEQUENCEControl Structure

Page 32: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Introduction Algorithm

A step-by-step procedure to solve a problem. Requirements:

Use operations from only a given set of basic operations.

Produce the problem solution, or answer, in a finite number of such operations.

Page 33: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Introduction Program Flowchart

Rectangles represent the process symbol. Ellipse symbols are called terminal interrupt

symbols. All symbols are connected by flowlines. Arrowheads show the direction of the flow.

Page 34: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Wake-Up Algorithm

Page 35: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Introduction Information Processing

Another name for paperwork. A series of planned actions and operations upon data

to achieve a desired result. Information-processing system elements:

The source data, or input, entering the system. The orderly, planned processing within the system. The end result, or output, from the system.

Page 36: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Data Hierarchy Data Hierarchy

FILE A collection of related data or facts.

RECORD A collection of data, about a single entity in the file.

FIELD Any single piece of data, about an entity (record) in a

file. CHARACTER

A letter (A-Z, a-z), number (0-9), or special character ( . or ? or %, and so on).

Page 37: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Data Hierarchy

Page 38: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Application Example The sales operations of a large department store.

A system flowchart is often created to show more general information about the application.

Page 39: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Application Example The leftmost symbol is the general input/output (I/O)

symbol, the parallelogram. The rectangular symbol is a general-purpose symbol

indicating, collectively, all processing steps within the sales program. Represents an action or series of actions performed

with computer help. Flowcharts aid in problem analysis and solution

planning.

Page 40: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Application Example The American National Standards Institute (ANSI)

coordinated the development of a standard set of flowcharting symbols and associated meanings.

A system flowchart shows the data, flow of work, and workstations within an information-processing system.

Page 41: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Application Example Sales Application Program Flowchart

In the program flowchart, the detailed steps needed to process the data about one person's sales must be specified.

To major actions with any problem-solving task: Define the problem to be solved. Develop a solution algorithm—steps to be taken to

solve the problem.

Page 42: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Problem (Problem Flowchart)

Page 43: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Application Example Variables

Data items whose values may change, or vary, during processing.

Defined Value When a variable is used in conjunction with a READ

statement, we can assume that the value of the variable is now known to the computer.

Data Independence The program will perform the required processing steps

on any set of input data.

Page 44: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Application Example Memory Diagram:

Left is a list of all the variable names referenced. Right represents the actual values.

Page 45: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Application Example Assignment Statement

Only a single variable name may appear to the left of the assignment symbol, which in our example is =.

Only a single variable name, constant, or expression may appear to the right of the =.

Everything to the right of the = must be known (defined) to the computer.

Constant A value that never changes.

Page 46: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Problem—Memory Diagram 2

Page 47: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Problem—Memory Diagram 3

Page 48: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Problem—Memory Diagram 4

Page 49: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Sales Application Example Choose descriptive variable names. Descriptive variable names make the algorithm

much more self-documenting and easier to read.

Page 50: Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.

Design Verification The solution algorithm should be verified.

Prevent errors from occurring. Detect and eliminate errors as soon as possible. A program can be written correctly, so that it

executes properly the first time it is run. Careful, early verification of the program design, or

solution algorithm, is an essential step in achieving this objective.