add methods to incement and decrement total spots
This commit is contained in:
parent
3269642002
commit
1518fbf51a
@ -29,6 +29,14 @@ class CarSpotController {
|
|||||||
this->occupied_spots++;
|
this->occupied_spots++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void increment_total_spots () {
|
||||||
|
this->total_spots++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void decrement_total_spots () {
|
||||||
|
this->total_spots--;
|
||||||
|
}
|
||||||
|
|
||||||
void decrement_occupied_spots () {
|
void decrement_occupied_spots () {
|
||||||
this->occupied_spots--;
|
this->occupied_spots--;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user