Großmarkt

market
Class UCustomer

java.lang.Object
  |
  +--users.User
        |
        +--market.UPerson
              |
              +--market.UCustomer
All Implemented Interfaces:
Comparable, Serializable

public class UCustomer
extends UPerson

This class implements the customers of the market.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class market.UPerson
FRAU, HERR
 
Fields inherited from class users.User
DEFAULT_PASSWORD_GARBLER, m_lhListeners
 
Constructor Summary
UCustomer(String userName)
          Creates a new UCustomer.
 
Method Summary
 String getCompany()
          Gets the customer's company.
 double getDiscount()
          Computes and returns the customer's current discount.
 CountingStockImpl getShoppingBasket()
          Gets the customer's shopping basket.
 void setCompany(String company)
          Sets the customer's company.
 
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, getCharFromString, getGlobalPassWDGarbler, getName, getStringFromChar, isPassWd, loggedOff, loggedOn, removeCapabilityDataListener, setCapabilities, setCapability, setGlobalPassWDGarbler, setPassWd, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UCustomer

public UCustomer(String userName)
Creates a new UCustomer.

Parameters:
userName - the customer's ID.
Method Detail

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

Großmarkt