0% found this document useful (0 votes)
2 views6 pages

Program Development Cycle

The document outlines the Program Development Cycle, detailing activities in design and coding phases, and discusses various software development life cycle methods like Rapid Application Development (RAD), Waterfall, and Iterative models. It highlights the importance of testing, including black box and white box testing, and describes types of program errors such as syntax, logic, and run-time errors. Additionally, it covers maintenance types: perfective, adaptive, and corrective, with examples related to website development.

Uploaded by

louqman.huawei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

Program Development Cycle

The document outlines the Program Development Cycle, detailing activities in design and coding phases, and discusses various software development life cycle methods like Rapid Application Development (RAD), Waterfall, and Iterative models. It highlights the importance of testing, including black box and white box testing, and describes types of program errors such as syntax, logic, and run-time errors. Additionally, it covers maintenance types: perfective, adaptive, and corrective, with examples related to website development.

Uploaded by

louqman.huawei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Program Development Cycle

Design (Activities)
- create identifier table
- create data structures // data types
- create file structures
- create test plan
- create pseudocode
- create flowchart etc.
- identify inputs/outputs/processes
- decomposing the problem into sub-problems
- choose a suitable programming language
Coding (Activities)
- Write program code
- define data structures
- use a translator to check and run the code
- initial debugging // testing

Q: A software company is working on a project to develop a website for a school.


The school principal has some ideas about the appearance of the website but is unclear
about all the details of the solution. The principal would like to see an initial version of the
website.
(i) Identify a life cycle method that would be appropriate in this case. Give a reason for your
choice.
Life Cycle Method: Rapid Application Development (RAD)
Reason:
- Provides a working model at an early stage for the principal to approve

Program Design
Structure Chart
Features that may be represented in a structure chart.
- Shows module hierarchy / relationships
- Shows parameters passed between modules
- Shows module names
- Shows sequence of the modules
- Iteration
- Selection

Passing parameter by Value

- Copy of value is passed


- Any local changes made are lost when the module terminates
1. The waterfall model

Principles:
- Linear – as each stage is completed before the next is begun
- Well documented as full documentation is completed at every stage
- Low customer involvement.

Benefit:
- easy to manage, understand and use
- stages do not overlap and are completed one at a time each stage has specific
deliverables
- works well for smaller programs where requirements are known and understood

Drawbacks:
- difficult to change the requirements at a later stage
- not suitable for programs where the requirements could be subject to change
- working program is produced late in the lifecycle
- not suitable for long, complex projects

The iterative model


Principles
- incremental development as the program development lifecycle is repeated
- working programs are produced for part of the system at every iteration
- high customer involvement, as part of the system can be shown to the customer after every
iteration

Benefits
- some working programs developed quickly at an early stage in the lifecycle
- easier to test and debug smaller programs
- more flexible as easier to alter requirements
- customers involved at each iteration therefore no surprises when final system delivered

Drawbacks
- whole system needs to be defined at start, so it can be broken down into pieces to be
developed at each iteration
- needs good planning overall and for every stage
- not suitable for short simple projects

Rapid application development (RAD)

Principles
- minimal planning
- reuses previously written code where possible, makes use of automated code generation
where possible
- high customer involvement, as customers can use the prototypes during development

Benefits
- reduced overall development time
- rapid frequent customer feedback informs the development
- very flexible as requirements evolve from feedback during development
- as parts of the system are developed side by side, modification is easier because each part
must work independently

Drawbacks
- system under development needs to be modular
- needs strong teams of skilled developers
- not suitable for short simple projects
Error & Maintenance
Syntax error
- An error in the grammar of the programming language
- An error that breaks the rules of the programming language
Example of syntax error

Error Example
DECLARE NUMBER AS INTEGER DECLARE NUMBER : INTEGER
IF... IF...
ENDWHILE ENDIF
Flag ← TRUE + 3 Flag TRUE

Logic error
- An error in the algorithm / design of the solution
- the program does not behave as expected / give the expected output.
- Example e.g. wrong arithmetic operator used / wrong loop count

Run-time error
• The program performs an illegal instruction / invalid operation
• Example: divide by zero or endless loop or simply 'crashes' / freezes

Two features of black box testing


- Code is unknown
- Data is chosen to test boundaries // test with normal, extreme and erroneous
- Testing whether the inputs produce the correct/expected outputs
- Testing if the program meets the requirements

Two features of white box testing


- Data is chosen to test code
- Tests every path in the code
- Test each line of code
- Internal structure is being tested
- Tester can view code

Q: A program doesn’t contain any syntax error. What does it mean.


- The program obeys the rules of the programming language used
- The program will run
Question

The procedure RandomPath() executes but gives an unexpected result.


(i) State the type of program error that has occurred and identify how this error can be
detected.
Program Error: Logic // Run-time

Method of Identification
- Testing the program with a range of data
- Whitebox testing
- Blackbox testing

(ii) Assume that the random number has been incorrectly generated in the procedure
RandomPath().
State two possible consequences of the incorrect use of the random number function.

White-box testing is the detailed testing of how each procedure works. This involves testing
the structure and logic of every path through a program module.
» Black-box testing tests a module’s inputs and outputs.
» Integration testing is the testing of any separately written modules to ensure that they
work together, during the testing phase of the program development lifecycle. If any of the
modules have not been written yet, this can include stub testing, which makes use of dummy
modules for testing purposes.

When the program has been completed, it is tested as a whole:


» Alpha testing is used first. The completed, or nearly completed, program is tested in-
house by the development team.

» Beta testing is then used. The completed program is tested by a small group of users
before it is generally released.

» Acceptance testing is then used for the completed program to prove to the
customer that it works as required in the environment in which it will be
used.
Maintenance
1. Perfective

2. Adaptive (Website example)


Reason: To accommodate a change in the requirement / technology / legislation
e.g. a new HTML version is available

3. Corrective (Website example)


Reason: The program does not operate as expected / contains a bug
e.g. passwords are not hidden

» Corrective maintenance is used to correct any errors that appear during use, for example
trapping a run-time error that had been missed during testing.

» Perfective maintenance is used to improve the performance of a program during its use,
for example improving the speed of response.

» Adaptive maintenance is used to alter a program so it can perform any new tasks
required by the customer, for example working with voice commands as well as keyboard
entry.

You might also like