cscie160.hw4
Class Cmd

java.lang.Object
  |
  +--cscie160.hw4.Cmd

public abstract class Cmd
extends java.lang.Object


Field Summary
 java.util.ArrayList pArgs
           
 ATM pAtm
           
 
Constructor Summary
Cmd(ATM mAtm, java.util.ArrayList mArgs)
          | Constructor for abstract command class.
 
Method Summary
abstract  java.lang.String doIt()
          | Empty method declaration.
protected static float stringToFloat(java.lang.String stringObject)
          | Converts a String to a float.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pAtm

public ATM pAtm

pArgs

public java.util.ArrayList pArgs
Constructor Detail

Cmd

public Cmd(ATM mAtm,
           java.util.ArrayList mArgs)
| Constructor for abstract command class. All commands require an ATM to which the command will be sent and and args list of arguments/parameters used by the command.
Parameters:
ATM - The target ATM to send this command to
ArrayList - Args list of values.
Method Detail

doIt

public abstract java.lang.String doIt()
                               throws ATMException
| Empty method declaration. All commands must have a doIt() method.
Returns:
String number of passengers on this floor wanting to go up.

stringToFloat

protected static float stringToFloat(java.lang.String stringObject)
| Converts a String to a float.
Parameters:
String - The string to convert.
Returns:
float A float representation of the given string.