C++ using Visual Studio please
Assignment Calculating fuel economy. This program will use exceptions and stream errors to make a robust application that gets the number of miles and gallons each time the user fuels their car. It will put those values into vectors. economy. 4. Once the user wants to quit enter values, it will calculate the fuel a. Create GetMiles() function that returns double. If there is a stream error, then throw a runtime_error with the message Invalid input received, you must enter a decimal number. Don't forget to clear the error and ignore all characters until the end of the stream. i. li. If the value is less then or equal to zero, then throw a runtime_error with the ii. Otherwise, return the miles the user entered i. If there is a stream error, then throw a runtime error w message. Miles cannot be less than e. b. Create GetGallons() function that returns double. th the message Invalio input received, you must enter a decimal number. Don't forget to clear the error and ignore all characters until the end of the stream. li If the value is less than or equal to zero, then throw a runtime_error with the message. Gallons cannot be less than ii. Otherwise, return the miles the user entered c. Create GetMPG(vector
gallons) function that returns a double i. If the size of the vectors is 0, then throw a runtime_error with the message No values recorded MPG is nan Otherwise, total the miles and gallons and return the miles per gallon. li. The main program should loop and get the Gallons and Miles catching any exceptions that were thrown. Then ask if they want to enter another tank. if they enter gallons d. and miles put the values into the vectors given. When the user is done the program should calculate the MPG by calling GetMPG, catching the exception if the user did not enter any values. Then it should show the result. Stream Errors cout number: if (cin.failo) ( /I Clear error state cin.clear) // Ignore characters in stream until newline cin.ignore (numeric limits: :max ), n') cout