Date: Mon, 11 Nov 1996 17:42:46 GMT Server: NCSA/1.5 Content-type: text/html Last-modified: Thu, 07 Nov 1996 19:16:49 GMT Content-length: 1528
At this point, you should do this type of error-checking. You should have a similar function from a previous assignment that you can cut-and-paste into program 6; make sure to change the prompt accordingly.
Since the input is within a member function, it certainly makes sense to do the latter. Contrast this with the following: suppose instead of read_app, you had to write a bunch of writer functions that filled each field one by one. These writer functions would probably do error checking on their own and assign default values since they don't interact with the user.
To summarize, if the interaction with the user is built into a member function (as it is with read_app), then, if the user enters an invalid value, she should be prompted again for a valid value. If the interaction with the user is not built into a member function (see the HourlyEmployee example), then your writer functions should be prepared to assign default values (or nothing at all) to the member variables.