diff options
Added my prep work for exam2
1 files changed, 20 insertions, 0 deletions
| -rw-r--r-- | Year 1/Object-oriented Programming/Exam 2 Preparation/Garage.h | 20 |
diff --git a/Year 1/Object-oriented Programming/Exam 2 Preparation/Garage.h b/Year 1/Object-oriented Programming/Exam 2 Preparation/Garage.h new file mode 100644 index 0000000..83781a4 --- /dev/null +++ b/Year 1/Object-oriented Programming/Exam 2 Preparation/Garage.h @@ -0,0 +1,20 @@ +#include "Vehicle.h" + +class Garage { + Vehicle** vehicles; + unsigned count; + unsigned maxCapacity; + + void copyFrom(const Garage& other); + void free(); + +public: + Garage(unsigned maxCapacity); + bool parkVehicle(const Vehicle& vehicle); + unsigned countOfCapableVehiclesForOrder(Road road, double roadLength, double time); + + Garage(); + Garage(const Garage& other); + Garage& operator=(const Garage& other); + ~Garage(); +}; |
