The ConsoleCommon toolset solves all of these issues through automatic typing and error validation. For example, let’s say that the application considers it invalid to pass in a date that is set for the future. Next, the application would conduct other validation checks. If the user, for example, passed in an invalid date, the application should know that before attempting to set the date field on the customer object and throw an appropriate error with a descriptive message to alert the user of what the issue it encountered was. Next, to be robust, the application would do some type validation prior to setting fields on the new customer object in order to avoid a type mismatch error. The first is that the application would have to require the user to pass in each argument in a pre-set order (first name then last name then date of birth, in our example). It would then set each of these properties to the values passed in from the user. In a robust design, the application would then create a customer object that has a first name, last name, and date of birth property. In the code, the application would first have to parse the user’s input arguments. Copy Code CustomerFinder.exe Yisrael Lax 11-28-1987
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |