Lab 12
Exceptions
There are two problems this week. As usual, use good object-oriented techniques,use multiple files, document well, and provide a makefile.
#1) Numerical to alphabetic conversions. From the textbook, #2, page 909. Unlike the specifications in the text, allow either
28 or 29 days for February. Of course, you can't determine which is correct as you are not entering the year. Have
your exception handlers write an appropriate message to the user and repeat the input that initially caused the
trouble. Be sure your message is clear enough so the user doesn't end up in an infinite loop.
#2) Handle range checking for arrays.From the textbook, #4, pages 910-911. Note you will need to read Appendix 6, pages 1012-1013
on how to overload []. By this point in the course, you should be able to develop a new concept without class instruction.
How well you define the exception class to be useful is part of this project. Note: Hackers use the fact that C
and C++ do not do range checking to hack a program and gain access to a user's computer.