A class to be used both for specifying a bus route (start, end,
and intermediate points), and a bus journey (embarkation,
disembarkation points).
-
Field Details
-
busNumber
public int busNumber
The ID assigned to a bus. When BusInfo
is
given to you, this field will be filled with a number.
When you create instances, you'll need to fill this with
a valid bus number.
-
forwardRoute
The list of points (stops) from start to end. forwardRoute[0]
is the start, and forwardRoute[forwardRoute.length-1]
is the end. The reverse route is the opposite direction going
from forwardRoute[forwardRoute.length-1]
to
forwardRoute[0]
.
-
embarkPoint
The point (stop) at which one hops on this bus.
-
embarkForward
public boolean embarkForward
Is it being taken in the forward direction?
-
disembarkPoint
The point (stop) at which one hops off this bus.
-
Constructor Details
-
BusInfo
public BusInfo()
Empty Constructor
-
Method Details
-
toString
public String toString()