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

22 lines
215 B
C++
Raw Permalink Normal View History

2019-03-03 21:46:58 +01:00
#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;
}