diff options
Diffstat (limited to 'PassengerException.h')
-rw-r--r-- | PassengerException.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/PassengerException.h b/PassengerException.h new file mode 100644 index 0000000..8acb395 --- /dev/null +++ b/PassengerException.h @@ -0,0 +1,18 @@ +#ifndef PASSENGEREXCEPTION_H +#define PASSENGEREXCEPTION_H + +#include<stdexcept> +using namespace std; + +// ALL YOU HAVE TO DO IS FIX #1 and #2. The rest comes down to the try and catch blocks you need to use in your main to test things out. + +class PassengerException: public logic_error +{ + public: + PassengerException(int request, int capacity): logic_error("Passenger Issues") + { + cout << "The requested int for passenger manipulation " << request << " is outside the capacity " << capacity << endl; + } +}; +#endif + |