I am interested in foundations of geometric and algebraic computation, especially numerically certified methods. Public class CityFrame extends Object. A CityFrame displays a robot City and the Things it. contains: Robots, Intersections, Walls, Lights, and so on. @author Byron Weber Becker. Robots Install/Setup. Becker's Robots are basically a set of classes that are written in Java. We can use these classes in our own programs by adding them as a library reference or resource when we use Dr.
A sample class implementing the ITollBooth
interface. It collects tolls, provides totals, and determines when it is appropriate to lift the toll gate.
Please see the package description for a more in-depth discussion of using this class.
- Author:
- Byron Weber Becker
Constructor Summary |
---|
SampleTollBooth() |
Method Summary | |
---|---|
void | addView(IView aView) Add a new view that is observing this object. |
void | arrival(int weight) A vehicle with the given weight has arrived at the toll booth. |
void | collectCoin(double value) Collect a coin in payment for the toll. |
void | departure() A vehicle has departed from the toll booth. |
double | getAmountOwed() Get the amount still owed for the current vehicle's toll. |
double | getTotalCollected() Get the total amount collected in tolls. |
int | getTotalVehicles() Get the total number of vehicles that have passed. |
static void | main(String[] args) Test the class. |
boolean | okToLiftGate() Determine whether enough has been paid to lift the gate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
SampleTollBooth
Method Detail |
---|
getTotalCollected
- Get the total amount collected in tolls.
- Specified by:
getTotalCollected
in interfaceITollBooth
getTotalVehicles
- Get the total number of vehicles that have passed.
- Specified by:
getTotalVehicles
in interfaceITollBooth
arrival
Becker Robots Methods Examples
- A vehicle with the given weight has arrived at the toll booth.
- Specified by:
arrival
in interfaceITollBooth
- Parameters:
weight
- The weight of the vehicle arriving at the toll booth.
departure
- A vehicle has departed from the toll booth.
- Specified by:
departure
in interfaceITollBooth
collectCoin
- Collect a coin in payment for the toll.
- Specified by:
collectCoin
in interfaceITollBooth
- Parameters:
value
- The value of the coin just collected from the driver of the vehicle.
getAmountOwed
- Get the amount still owed for the current vehicle's toll.
- Specified by:
getAmountOwed
in interfaceITollBooth
okToLiftGate
- Determine whether enough has been paid to lift the gate.
- Specified by:
okToLiftGate
in interfaceITollBooth
addView
- Add a new view that is observing this object.
- Specified by:
addView
in interfaceITollBooth
- Parameters:
aView
- The view to add.
main
Becker Robots Methods Cheat
- Test the class.
Becker Robots Methods Definition
Overview | Package | Class | Tree | Deprecated | Index | Help |