public interface ShoppingCartInterface
ShoppingCart.xml
example.
This is a placeholder until you develop your own interface using JAX-WS
tools.Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
addItem(Dvd dvd)
Adds a DVD to the shopping cart.
|
java.lang.Boolean |
checkout()
Advances to the checkout, if the cart contains some items.
|
void |
clearItems()
Removes all purchases from the shopping cart.
|
java.lang.Float |
confirm()
Confirms the amount to pay, completes the transaction and returns
to the ready state.
|
void |
enterShop()
Enters the shop, to start adding items to the cart.
|
void |
exitShop()
Exits the shop, discarding all items chosen so far.
|
java.lang.Float |
getBill()
Returns the total amount owing for all purchases.
|
java.lang.String |
getScenario()
Returns the last scenario that was enacted.
|
java.lang.String |
getState()
Returns the last state that was entered.
|
java.lang.Boolean |
payBill(java.lang.Integer billingInfo,
java.lang.String addressInfo)
Supply billing and shipping information at the checkout.
|
java.lang.Integer |
removeItem(Dvd dvd)
Removes a DVD from the shopping cart.
|
void |
reset()
Resets the service to its clean initial state.
|
void reset()
java.lang.String getScenario()
java.lang.String getState()
void enterShop()
void exitShop()
java.lang.Integer addItem(Dvd dvd)
dvd
- the selected DVD to add.java.lang.Integer removeItem(Dvd dvd)
dvd
- the selected DVD to remove.void clearItems()
java.lang.Boolean checkout()
java.lang.Float getBill()
java.lang.Boolean payBill(java.lang.Integer billingInfo, java.lang.String addressInfo)
billingInfo
- the billing information.addressInfo
- the shipping address.java.lang.Float confirm()