Write a menu driven program that allows you to create a file of customers for a company. The first part of the program should create an empty file suitable for writing a three-digit ID number, six-character last name, and five-digit zip code for each customer. The second half of the program accepts user input to populate the file; name your file "CUSTOMERS.DAT". For this exercise, assume that the user will correctly enter ID numbers and zip codes, but force the customer name to seven characters if it is too long or too short. Issue an error message-using exception handling-and do not save the records if the user tries to save a record with an ID number that has already been used.

Add a menu item to your lab program that creates a file "INVENTORY.DAT" of items carried by the company. Include a three-digit item number and up to a 20-character description for each item. Issue an error message-using exception handling-if the user tries to store an item number that has already been used, is less than or greater than three-digits, or the description is more than 20 characters.

Add another menu item that takes customer orders. Allow a user to enter a customer number and item ordered. Display an error message-using exception handling-if the customer number does not exist in the "CUSTOMERS.DAT" file or the item does not exist in the "INVENTORY.DAT" file; otherwise, display all the customer information and item information.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.