From 481468176e30c07872aea61ef65ba9156efd0fa6 Mon Sep 17 00:00:00 2001 From: Michael Abed Date: Tue, 27 Nov 2012 12:21:46 -0500 Subject: add lab 4 --- PassengerException.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 PassengerException.h (limited to 'PassengerException.h') 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 +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 + -- cgit v1.2.3