All Packages Class Hierarchy This Package Previous Next Index
Class orderprocessing.OrderItem
java.lang.Object
|
+----orderprocessing.OrderItem
- public class OrderItem
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Cloneable
This class contains information about a single item on a customer order
Note that this class implements the Immutable Object design pattern.
-
OrderItem(int, long, double)
- Create an order item for a given quantity of a certain item
-
clone()
-
-
display()
-
-
displayExtended()
-
-
itemNumber()
-
-
quantity()
-
-
toString()
-
-
unitPrice()
-
OrderItem
public OrderItem(int quantity,
long itemNumber,
double unitPrice)
- Create an order item for a given quantity of a certain item
- Parameters:
- quantity - The quantity ordered.
- itemNumber - The item desired.
- unitPrice - The price per unit for this item.
quantity
public int quantity()
itemNumber
public long itemNumber()
unitPrice
public double unitPrice()
display
public void display()
displayExtended
public void displayExtended()
clone
public java.lang.Object clone()
- Overrides:
- clone in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
All Packages Class Hierarchy This Package Previous Next Index