Write a function with which you can calculate numerically the integral of a given real function with two limits a and b using the trapezoid rule. Modify fnExample4 to do….
Deﬁne the Time class described in Chapter 7.
1. Deﬁ ne the Time class described in Chapter 7. Provide checking for time and throw exception when an invalid time is input, either from the constructor or the user.
2. Deﬁ ne a stack class. The class should throw an exception when the stack underﬂ ow and overﬂ ow take place.
3. Deﬁ ne a class TheException, which contains member functions for displaying messages regarding stack underﬂ ow and overﬂ ow. When overﬂ ow occurs, it asks for increasing the stack size. If the user says yes, it should respond by increasing the stack size. Use dynamically allocated array to implement stack.