Question: - Create a c++ program. Your program should have a menu: 1 through 4. -If the user selects an option not between 1 or 4

- Create a c++ program. Your program should have a menu: 1 through 4.

-If the user selects an option not between 1 or 4 the system should throw the exception: Menu Option not available. (Cannot use if) - Option 1: Demonstrate the use of the catch and try by creating an empty array and trying to read it.

- Option 2: Demonstrate the use of the catch by trying to access a file which is not created in the file path

- Option 3: demonstrate the use of exceptions by asking the user to enter a character letter in an int value.

- Option 4: Exit of the program

Note: The use of exceptions in try and catch blocks should be used, don't use if else

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!