vehicle
Module: Vehicle and vehicle types.
Car
¶
Bases: Vehicle
Class: Car.
Source code in parking_lot/src/vehicle.py
34 35 36 37 38 |
|
Factory
¶
Bases: ABC
Class: Factory to create vehicle instances.
Source code in parking_lot/src/vehicle.py
55 56 57 58 59 60 |
|
Motorbike
¶
Bases: Vehicle
Class: Motorbike.
Source code in parking_lot/src/vehicle.py
48 49 50 51 52 |
|
Truck
¶
Bases: Vehicle
Class: Truck.
Source code in parking_lot/src/vehicle.py
41 42 43 44 45 |
|
Vehicle
¶
Class: Vehicle.
Source code in parking_lot/src/vehicle.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
__init__(vehicle_id, vehicle_type)
¶
Initializes Vehicle instance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle_id
|
int
|
Unique identifier of vehicle |
required |
vehicle_type
|
Enum
|
Vehicle type Enum |
required |
Source code in parking_lot/src/vehicle.py
18 19 20 21 22 23 24 25 26 27 |
|
VehicleType
¶
Bases: str
, Enum
Types of vehicles.
Source code in parking_lot/src/vehicle.py
7 8 9 10 11 12 |
|