market
Class UCustomer
java.lang.Object
users.User
market.UPerson
market.UCustomer
- All Implemented Interfaces:
- Serializable
public class UCustomer
- extends UPerson
This class implements the customers of the market.
- See Also:
- Serialized Form
Methods inherited from class market.UPerson |
compareTo, getAdress, getCity, getDayOfRegistration, getFirstName, getFullName, getMonthsOfMembership, getPostcode, getSalutation, getStreet, getSurname, getTelephone, setAddress, setCity, setFirstName, setFullName, setPostcode, setSalutation, setStreet, setSurname, setTelephone |
Methods inherited from class users.User |
addCapabilityDataListener, equals, fireCapabilitiesAdded, fireCapabilitiesReplaced, garblePassWD, getCapability, getCapabilityCheckBox, getGlobalPassWDGarbler, getName, isPassWd, loggedOff, loggedOn, removeCapabilityDataListener, setCapabilities, setCapability, setGlobalPassWDGarbler, setPassWd, toString |
UCustomer
public UCustomer(String userName)
- Creates a new UCustomer.
- Parameters:
userName
- the customer's ID.
setCompany
public void setCompany(String company)
- Sets the customer's company.
- Parameters:
company
- the company to be set.
getCompany
public String getCompany()
- Gets the customer's company.
- Returns:
- the company.
getShoppingBasket
public CountingStockImpl getShoppingBasket()
- Gets the customer's shopping basket.
- Returns:
- the shopping basket.
getDiscount
public double getDiscount()
- Computes and returns the customer's current discount.
The discount is a value in the range from 0 to 1.
- Returns:
- the discount.
- See Also:
Options