CSE687 - Object Oriented Design

Design Note #8
Robustness: Validate User Input and Directory Specifications

Revised: 4/28/2011
Home Courses Code Handouts CoreTech Books Articles Math Research Masters Projects SWDev WebDev News OtherLinks SiteDesign Graduates AllPages Office Hours Notices

CSE681-SWMAA CSE686-IP CSE687-OOD CSE775-DO CSE776-DP CSE778-AWP CSE784-SWS

Cncp #01 Cncp #02 Cncp #03 Cncp #04 Cncp #05 Cncp #06 Cncp #07 Cncp #08 Cncp #09 Cncp #10 Cncp #11
Note #01 Note #02 Note #03 Note #04 Note #05 Note #06 Note #07 Note #08
Lang #01 Lang #02 Lang #03 Lang #04

Syllabus SG - Design SG - Templates SG - Class Relationships

Design Note #8:

Validate user input and directory specifications:

Conclusions for Robustness: Validate User Input and Directory Specifications

Programs are robust, not because they never encounter errors, but because they implement processing for validation and error handling.
  1. Always validate user input and provide help for the user to correctly supply input.
  2. Validate directory and file operations by checking stream state after each stream operation. Throw meaningful exception messages when errors occur.