12
Describe the Program Development Cycle

Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Embed Size (px)

Citation preview

Page 1: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Describe the Program Development Cycle

Page 2: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Program Development Cycle

The program development cycle is a series of steps programmers use to build computer programs.

1. Analyze Requirements

2. Design Solution

3. Validate Design

4. Implement Design

5. Test Solution

6. Document Solution

Page 3: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Program Development Cycle The program development cycle is a continuous cycle which consists of six steps that form a loop.

Step 2Design

Solution

Step 6DocumentSolution

Step 3ValidateDesign

Step 4Implement

Design

Step 5Test

Solution

Step 1Analyze

Requirements

Page 4: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Step 1 – Analyze Requirements

The analysis step consists of three major tasks:

1. Review the requirements

2. Meet with the systems analyst and users

3. Identify input, output, processing, and data components

Page 5: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Step 2 – Design Solution

Designing a solution often involves developing a graphical or written description of the step-by-step procedures involved in solving the problem

MAIN

Initialization Process Wrap-up

Read aRecord

Print DetailLine

AccumulateTotals

CalculateCalculateAverages

Print TotalsAnd Averages

DeclareVariables

Print ReportHeadings

CalculateRegular

Time pay

OvertimeTime pay

CalculateGross Pay

The hierarchy chart above is a tool the programmer uses during structured design. On the hierarchy chart, program modules are drawn as rectangles. All modules are subordinate to the main module.

Page 6: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Design Solution Using Control Structures

A control structure, also known as a construct, depicts the logical order of program instructions in more detail. There are three basic control structures:

1. Sequence Control Structures

2. Selection Control Structures

3. Repetition Control Structures

Action 1 Action 3Action 2

Action 1 Action 2

ConditionTrue False

Condition

Action 1 Action 2 Action 3

Condition 1 Condition 2 Condition 3 Condition

Action

Action

Condition

False

TrueTrue

False

Case Control Structure Do-While Control Structure Do-Until Control Structure

Page 7: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Flowcharts allow you to plan and visualize the program development process in detail.

Design Solution Using Flow Chart as a Design Tool

Page 8: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Step 3 – Validate Design

Once programmers develop the solution algorithm using a program flowchart or pseudo code, they should validate or check the program design for accuracy to uncover logic errors. Two techniques for reviewing a solution algorithm are a desk check and a structured walkthrough. Desk checking involves five steps:

1. Develop various sets of test data (inputs)

2. Determine the expected result (output) for each set of data

3. Step through the solution algorithm using one set of test data and write down the actual result obtained (output) using the solution algorithm

4. Compare the expected result from Step 2 to the actual result from Step 3

5. Repeat Steps 3 and 4 for each set of test data

Page 9: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Step 4 – Implement Design

Implementation of the design includes writing the actual code that translates the design into a program. As programmers enter a program, they should use comments to provide documentation for their program.

In the example the Visual Basic code shown below, the lines in red are comment lines that help to document what is happening in the code that follows. Comments are very useful for troubleshooting a program and indicating what is supposed to be happening in a particular part of the program.

Rem THESE FOLLOWING ROUTINES EXTRACT SELECTED DATA MATERIAL FOR Phrases & Sentences

If Left$(KK.FileName, 1) <> "2" And KK.SpecialWindow = "Beginnings" And InStr(LineOriginal(RandomLine), " " + KK.CharacterString) = 0 Then ShowOriginalIf Left$(KK.FileName, 1) <> "2" And KK.SpecialWindow = "Endings" And InStr(LineOriginal(RandomLine), KK.CharacterString + " ") = 0 Then ShowOriginalIf Left$(KK.FileName, 1) <> "2" And KK.SpecialWindow = "Selected" And InStr(LineOriginal(RandomLine), KK.CharacterString) = 0 Then ShowOriginal

If Left$(KK.FileName, 1) <> "2" And KK.SpecialWindow = "Double" Then N = Len(LineOriginal(RandomLine)): DoubleFound = 0 For x = 1 To N If Mid$(LineOriginal(RandomLine), x, 1) = Mid$(LineOriginal(RandomLine), x + 1, 1) Then DoubleFound = 1: Exit For Next x If DoubleFound = 0 Then ShowOriginalEnd IfRem THESE FOLLOWING ROUTINES EXTRACT SELECTED DATA MATERIAL FOR Words

While Left$(KK.FileName, 1) = "2" And Len(Words) < 32: ' this sets line for words

RandomLine = Int(LastLineCount * Rnd(1) + 1)

Page 10: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Step 5 – Test Solution

Once a programmer codes and enters the program, the next step is to test it. Thorough testing is extremely important. After developers place the program into production, many users rely on the program and its output to support their daily activities.

Errors uncovered during this step are usually syntax errors or logic errors.

Syntax errors are errors in using the code or program language that the computer doesn’t understand.

Logic errors are errors such as using a formula that is not correct or not sequencing the program in correct order.

Page 11: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Step 6 – Document Solution

In documenting the solution, the programmer (1) reviews the program code, and (2) reviews all the documentation before turning everything over to the systems analyst.

In reviewing the code, the programmer removes any “dead code.” This is code with instructions that the program never executes. This might consist of a section that the programmer wrote and then later replaced with a routine that works more efficiently.

The programmer also makes sure there is adequate documentation in the program so that if changes need to be made in the program later on the new programmer will be able to easily identify what each section of the program is supposed to do and can make changes or corrections in the program very easily without having to spend a lot of time decoding.

Page 12: Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer

Steps in the Program Development Cycle