Paper 2 · Unit 12. Development life cycles, design charts, errors, testing and maintenance.

1. Program development life cycle

Stages: analysis (requirements), design, coding, testing and maintenance.

ModelFeaturesSuits
WaterfallEach stage is completed before the next; little user involvement after analysisSmall projects with clear, fixed requirements
IterativeThe system is built in increments; each cycle adds features and is testedLarge projects where requirements may change
Rapid Application Development (RAD)Prototypes are built quickly and refined with constant user feedback; modules developed in parallelProjects needing quick delivery and close user involvement

2. Structure charts and state-transition diagrams

A structure chart shows how a program is broken into modules, the order they are called, and the parameters passed between them (data couples and flags). Symbols show selection (diamond) and iteration (curved arrow).

A state-transition diagram shows the states a system can be in, the events (inputs) that cause transitions, and outputs. A circle shows a state, an arrow a transition, and a double circle the halting state.

3. Errors and testing

ErrorDescription
Syntax errorBreaks the rules of the language; found by the translator
Logic errorThe program runs but gives the wrong result
Run-time errorThe program crashes while running, e.g. division by zero
Testing methodDescription
Dry run / walkthroughFollowing the code by hand, often with a trace table
White-boxTests every path through the code using knowledge of its structure
Black-boxTests inputs against expected outputs without looking at the code
IntegrationTests that modules work together
Stub testingUses simple placeholder modules for parts not yet written
AlphaIn-house testing by the developers
BetaTesting by a group of real users before release
AcceptanceThe client tests the finished system against the requirements

A test plan lists each test, its purpose, test data, expected and actual results. Test data types: normal, abnormal, extreme and boundary.

Try it: classify the test data (valid range 1 to 100 inclusive)

4. Maintenance

TypePurpose
CorrectiveFixing errors found after release
AdaptiveChanging the program to meet new requirements, laws or hardware
PerfectiveImproving performance or usability, even though it already works

5. Examiner tips

  1. Justify the model using the scenario (fixed requirements, user feedback, time).
  2. Logic errors do not stop the program running.
  3. Extreme data is valid; boundary invalid data is just outside.
  4. Stub testing is used before all modules exist.
  5. Name the maintenance type precisely: corrective, adaptive or perfective.

6. Practice questions

Practice: answer and check instantly

Type a short answer, then press Check or Enter.

Show answer

Waterfall.

Show answer

Rapid Application Development.

Show answer

A logic error.

Show answer

Beta testing.

Show answer

Black-box testing.

Show answer

Corrective maintenance.

Show answer

Adaptive maintenance.

Show answer

A stub.

Exam-style questions

9. Compare the waterfall and iterative models. [4]

Show mark guide

Waterfall: stages done once in order [1] · hard to go back to change requirements [1] · iterative: system built in repeated cycles [1] · users give feedback each cycle so changes are easier [1].

10. A program accepts whole numbers from 1 to 100. Give one example of normal, extreme and abnormal test data, with a reason. [3]

Show mark guide

Normal e.g. 50, accepted [1] · extreme e.g. 1 or 100, accepted as the limit [1] · abnormal e.g. 150 or "abc", rejected [1].

7. Topic test: predict your grade

Topic test: predict your grade

15 questions, about 10 minutes. Answer them all, then press Mark my test.

1. Which stage gathers requirements?
2. Waterfall suits…
3. RAD relies on…
4. A structure chart shows…
5. In a state-transition diagram, an arrow shows…
6. A syntax error is found…
7. Division by zero causes a…
8. White-box testing…
9. Alpha testing is done by…
10. Acceptance testing…
11. Integration testing checks…
12. Extreme test data is…
13. Abnormal data should be…
14. Perfective maintenance…
15. A test plan includes…

Frequently asked questions

What is the difference between waterfall, iterative and RAD?

Waterfall completes each stage once in order. Iterative builds the system in repeated cycles. RAD uses quick prototypes refined with constant user feedback.

What is the difference between black-box and white-box testing?

Black-box testing checks inputs against expected outputs without looking at the code. White-box testing tests every path through the code using knowledge of its structure.

What are the three types of maintenance?

Corrective maintenance fixes errors, adaptive maintenance changes the program for new requirements or hardware, and perfective maintenance improves performance or usability.

Was this page helpful?