TDT4102-Ovinger/Oving 8/Oving 8/Car.cpp

22 lines
215 B
C++

#include "Car.h"
Car::Car(unsigned int freeSeats) :
freeSeats{freeSeats}
{
}
bool Car::hasFreeSeats() const
{
if (freeSeats > 0)
return true;
return false;
}
void Car::reserveFreeSeat()
{
--freeSeats;
}