• Write a function that accepts two numeric parametersand returns the average of the two numbers. The function shouldthrow an exception if it is passed non-numeric parameters andencounter error in calculation.
• Demonstrate the use of this function by writing a simple driverprogram.
Expert Answer
Answer to • Write a function that accepts two numeric parameters and returns the average of the two numbers. The function should…