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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started