Programming in IDE
Programming in IDE
Syllabus Content:
2.4.2 Program testing:
show understanding of ways of exposing faults in programs and ways of avoiding
faults
locate and identify the different types of errors:
o syntax errors
o logic errors
o run-time errors
correct identified errors
Testing strategies
Finding syntax errors is easy. The compiler/ interpreter will find them for you and usually gives
you a hint as to what is wrong.
Syntax Error:
A syntax error is a 'grammatical' error, in which a program statement does not follow the rules
of the high-level language constructs.
1
Paper 2. Sec 2.4.1) Programming in IDE Computer Science 9608
with Majid Tahir
Much more difficult to find are logic errors and run-time errors.
A run -time error occurs when program execution comes to an unexpected ha lt or 'crash' or it
goes into an infinite loop and 'freezes'.
Logical Error:
Logic error: an error in the logic of the solution that causes it not to behave as intended
Run-time Error:
Run-time error: an error that causes program execution to crash or freeze
Testing
Both of these types of errors can only be found by careful testing. The danger of such errors is
that they may only manifest themselves under certain circumstances. If a program crashes
every time it is executed, it is obvious
there is an error.
Stub testing
When you develop a user interface,
you may wish to test it before you
have implemented all the facilities.
2
Paper 2. Sec 2.4.1) Programming in IDE Computer Science 9608
with Majid Tahir
References:
Cambridge International AS & A level Computer Science Course book by Sylvia Langfield and Dave Duddell
Visual Basics Console Mode Editor Window from notes of Sir Majid Tahir