Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Exam 2 Preparation / Garage.h
blob: 83781a4e4ea113ef4e1f4db4cf5b510115f50c8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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();
};