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)
Purchasing
createAccount
in interface Purchasing
public double checkout(String email, String password)
Purchasing
checkout
in interface Purchasing
private String generatePassword()
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.