Example 7: Credit card validation (menu item 3 continued)

In the previous examples you created an application which received an incoming call and presented a menu to the caller. You wrote a separate Java class for the third menu item, which allowed the caller to order an item from a catalog. In this example you will create another class which you will use to obtain and validate credit card information from the caller. This example gives you more practice at using separate classes in your main application, and shows you how you can validate input without using an InputValidator.