|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.omg.PortableServer.Servant | +--edu.cmu.mse17654.Casino.BankPOA | +--edu.cmu.mse17654.Casino.BankImpl
The Implementation of the idl Banking interface.
Constructor Summary | |
BankImpl(edu.cmu.mse17654.Casino.BankDB bdb)
This constructor method will read the credit card information from the data file. |
Method Summary | |
void |
buyChips(int playerID,
int quantity)
This method is to add the chips to the databse for the specified player ID. |
int |
getChipBalance(int playerID)
This method is to get the current chip balance of the specified player from the database. |
void |
sellAllChips(int playerID)
This method is to cash the chips of the specified player from the bank. |
void |
sellChips(int playerID,
int quantity)
This method is to sell some of the chips of the specified player from the bank. |
Methods inherited from class edu.cmu.mse17654.Casino.BankPOA |
_all_interfaces, _invoke, _this, _this |
Methods inherited from class org.omg.PortableServer.Servant |
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BankImpl(edu.cmu.mse17654.Casino.BankDB bdb)
bdb
- The bank database referenceMethod Detail |
public void buyChips(int playerID, int quantity) throws edu.cmu.mse17654.Casino.InvalidPlayerID
playerID
- The player IDquantity
- The chip quantity that player wants to buy
It
- raises the exception when the player ID is invalid.
edu.cmu.mse17654.Casino.InvalidPlayerID
public void sellChips(int playerID, int quantity) throws edu.cmu.mse17654.Casino.InvalidPlayerID
playerID
- The player IDquantity
- The chip quantity that player wants to buy
It
- raises exception when the player ID is invalid.
edu.cmu.mse17654.Casino.InvalidPlayerID
public void sellAllChips(int playerID) throws edu.cmu.mse17654.Casino.InvalidPlayerID
playerID
- The player ID
It
- raises exception when the player ID is invalid.
edu.cmu.mse17654.Casino.InvalidPlayerID
public int getChipBalance(int playerID)
playerID
- The player ID
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |