Download presentation
Presentation is loading. Please wait.
Published byAudrey Cameron Modified over 9 years ago
1
Describe the Program Development Cycle
2
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
3
Program Development Cycle The program development cycle is a continuous cycle which consists of six steps that form a loop. Step 2 Design Solution Step 3 Validate Design Step 4 Implement Design Step 5 Test Solution Step 6 Document Solution Step 1 Analyze Requirements
4
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
5
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 Declare Variables Print Report Headings Process Read a Record Calculate Regular Time pay Overtime Time pay Calculate Gross Pay Accumulate Totals Print Detail Line Wrap-up Calculate Averages Print Totals And Averages 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.
6
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 1Action 3Action 2 Action 1Action 2 Condition TrueFalse Condition Action 1Action 2Action 3 Condition 1 Condition 2 Condition 3 Condition Action Condition False True False Case Control StructureDo-While Control StructureDo-Until Control Structure
7
Flowcharts allow you to plan and visualize the program development process in detail. Design Solution Using Flow Chart as a Design Tool
8
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
9
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 ShowOriginal If Left$(KK.FileName, 1) <> "2" And KK.SpecialWindow = "Endings" And InStr(LineOriginal(RandomLine), KK.CharacterString + " ") = 0 Then ShowOriginal If 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 ShowOriginal End If Rem 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)
10
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.
11
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.
12
Steps in the Program Development Cycle
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.