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.


Constructor Index

 o OrderItem(int, long, double)
Create an order item for a given quantity of a certain item

Method Index

 o clone()
 o display()
 o displayExtended()
 o itemNumber()
 o quantity()
 o toString()
 o unitPrice()

Constructors

 o 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.

Methods

 o quantity
 public int quantity()
 o itemNumber
 public long itemNumber()
 o unitPrice
 public double unitPrice()
 o display
 public void display()
 o displayExtended
 public void displayExtended()
 o clone
 public java.lang.Object clone()
Overrides:
clone in class java.lang.Object
 o toString
 public java.lang.String toString()
Overrides:
toString in class java.lang.Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index