Skip to content

Week 5 - Validation and Reliable Input

This week focuses on reliable user input. The coding task uses validation methods, while the theory work draws on Section 4 ideas about selection, iteration and validation order.

Key knowledge and skills

  • existence, type and range checks
  • repeated input using loops until valid data is entered
  • methods that isolate validation logic
  • designing software that rejects invalid data safely
  • explaining why validation improves reliability but does not guarantee truth

Coding principles covered

  • validate data before using it in calculations
  • check existence, then type, then range
  • use TryParse instead of risky direct conversion
  • keep validation logic reusable rather than rewriting it for each field

Useful theory pages

Task checklist