Constructor
new FireTruck(licencePlate, make, model, kmTraveled, waterStorage)
Create a FireTruck.
Parameters:
Name | Type | Description |
---|---|---|
licencePlate |
string | |
make |
string | |
model |
string | |
kmTraveled |
number | |
waterStorage |
number |
Methods
(static) validateLicencePlate(licencePlate) → {boolean}
A static function of the FireTruck class. Matches the licence plate against a regex to check it's validity for the region of Burgas.
Parameters:
Name | Type | Description |
---|---|---|
licencePlate |
string |
changeAvailability(toAvailable) → {number}
Changes the availability of the FireTruck.
Parameters:
Name | Type | Description |
---|---|---|
toAvailable |
boolean |