Chapter 1 Introduction to Structured Design. Introduction System A combination of people,...
-
Upload
cecil-simpson -
Category
Documents
-
view
217 -
download
2
Transcript of Chapter 1 Introduction to Structured Design. Introduction System A combination of people,...
Chapter 1
Introduction to Structured Design
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.
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.
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.
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.
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.
Design the New System Computer-Assisted Software Engineering (CASE)
The automation of tools, methods, and procedures for system development.
Develop the New System Each of the programs called for in the system
design is constructed. Program Development Cycle (PDC)
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.
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.
Program Flowchart and Pseudocode
Program Flowchart and Pseudocode cont.
Develop the New System Hierarchy Chart or Structure Chart
Shows the relationships among parts of a program. Each program part is called a module.
Structure Chart
Develop the New System Class diagrams are expressed in the Unified
Modeling Language, or UML.
Sample Input Screen (Not User Friendly)
Sample Input Screen (User-Friendly)
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.
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.
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.
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.
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.
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.
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.
Develop the New System Evaluate the New System
Is it meeting the required objectives? Parts of the system may have to be modified.
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.
Structured Programming Basic Control Structures
SIMPLE SEQUENCE Control Structure Execute instructions in a step-by-step, sequential
manner.
Structured Programming IFTHENELSE Control Structure
The computer's ability to make a decision.
Structured Programming DOWHILE Control Structure
The computer's ability to repeat a series of instructions. A series of repeated instructions is a loop.
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.
Chapter 2
SIMPLE SEQUENCEControl Structure
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.
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.
Wake-Up Algorithm
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.
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).
Data Hierarchy
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.
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.
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.
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.
Sales Problem (Problem Flowchart)
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.
Sales Application Example Memory Diagram:
Left is a list of all the variable names referenced. Right represents the actual values.
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.
Sales Problem—Memory Diagram 2
Sales Problem—Memory Diagram 3
Sales Problem—Memory Diagram 4
Sales Application Example Choose descriptive variable names. Descriptive variable names make the algorithm
much more self-documenting and easier to read.
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.