home *** CD-ROM | disk | FTP | other *** search
- ╦char access╦( unsigned int index╦) { ╘// Part 3 char array╦[] = {'a'╦, 'b'╦, 'c'╦}; if ( index ╦>= 3╦) { throw( BoundsExcept╦()); } return array╦[index╦]; } void main╦() { for (int i ╦= 1╦; i ╦<= 3 ╦; i╦++) { try { if ( i╦ == 1╦ ) divide╦(1╦,0╦);╘ // attempt to divide 1 by 0 ╦else if (i╦ == 2╦) read╦(); ╘ // always throws an IOExcept ╦else if (i ╦== 3╦) access╦();╘ // always throws an Exception ╦}