교육자를 위해: Testing, debugging and error types(Computer Science, Programming)을(를) 위한 바로 쓸 수 있는 수업 슬라이드, 복습 노트 — 수업에 사용하거나, 학습자들이 실시간 게임으로 즐기는 인터랙티브 클래스 활동으로 진행하세요.
A syntax error violates language grammar, such as a missing required bracket; a compiler or interpreter reports it before executing the affected code.
A logic error produces unintended behaviour despite syntactically valid code.
A runtime error arises during execution, such as a rejected out-of-range access. Errors can be handled; they do not invariably crash the whole application.
Program error types
Testing
Test data types: normal (valid), boundary (at the edge of valid ranges) and erroneous (invalid). For age 18-65: normal 30; boundary 18, 65 (and 17, 66 as invalid boundaries); erroneous "abc".
A test plan lists inputs, expected outputs and actual outputs.
Iterative testing: testing during development. Final/terminal testing: at the end against the specification.
Test data categories
Debugging tools
Trace tables, breakpoints, stepping through code, watch windows, print statements; IDE error messages.
Debugging tools
Good practice
Write comments, meaningful names, modular code; test each module; fix one error at a time.
Defensive design
Anticipate misuse and handle errors gracefully.
슬라이드
Sign up free to view the lesson slides
Step through every slide for this topic — plus flashcards and revision notes — with a free account.