#pragma once
#include <iostream>
#include "barrier.h"
#include "sensor.h"
using namespace std;
class CarPark
{
public:
	CarPark() { capacity = 100; spaces = 100; } //inline constructor
	//void incrementSpaces(void);
	void decrementSpaces(void);
	void spacesLeft(void);
	Barrier barrierEntrance;
	Sensor sensorEntrance;
private:
	int capacity;
	int spaces;
};

void CarPark::decrementSpaces(void)
{
	spaces--;
	//debug 
	cout << "spaces left: " << spaces << endl;
}

void CarPark::spacesLeft(void)
{
	cout << "Number of spaces left = " << spaces << endl;
}