The class Vehicle
The class Vehicle
which represents a vehicle in the system is very simple.
Its role is only to keep track of when the vehicle was created and where it is heading.
The destination is provided as a parameter for the init
method (constructor) while the born time
needs to be fetched with get_time()
in the downloaded module wallclock.py
.
The class can be illustrated with this class diagram: |
![]() |