Question: a) Write a try-catch block. In try block, do the following thing: if the balance is less than 100, throw an InsufficientFund exception; else print

a) Write a try-catch block. In try block, do the following thing: if the balance is less than 100, throw an InsufficientFund exception; else print out the message saying that there are enough money in the account. In catch block, simply print out the message saying that there is not enough money in the account.

b)

Write a template function template T max(T& variable1, T& variable2) That returns the larger value of variable1 and variable 2. Assume that class T has overloaded the operator >.

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!