public class PurchasingImpl extends Object implements Purchasing
| Modifier and Type | Field and Description |
|---|---|
private EntityManager |
em |
private static org.apache.commons.logging.Log |
log |
private Random |
random |
| Constructor and Description |
|---|
PurchasingImpl() |
| Modifier and Type | Method and Description |
|---|---|
double |
checkout(String email,
String password)
Completes the purchase of the items in the user's shopping cart,
empties the cart, and returns the total cost paid.
Note that this capability is not yet fully defined.
|
Account |
createAccount(String email,
String firstName,
String lastName)
Creates an account for the user to use in purchasing products.
|
private String |
generatePassword() |
void |
setEntityManager(EntityManager em) |
private static org.apache.commons.logging.Log log
private EntityManager em
private Random random
public void setEntityManager(EntityManager em)
public Account createAccount(String email, String firstName, String lastName)
PurchasingcreateAccount in interface Purchasingpublic double checkout(String email, String password)
Purchasingcheckout in interface Purchasingprivate String generatePassword()
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.