Class Notebook

java.lang.Object
  |
  +--Notebook
All Implemented Interfaces:
UPC

public class Notebook
extends java.lang.Object
implements UPC

This class implements a simple product description for a notebook


Constructor Summary
Notebook(long theUPC)
          Construct a new NoteBook using the parameter provided.
 
Method Summary
 long getUPC()
          Any class that implements the UPC interface must be able to say what its UPC code is.
 java.lang.String toString()
          return a String describing this Notebook
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Notebook

public Notebook(long theUPC)
Construct a new NoteBook using the parameter provided.

Parameters:
theUPC - The UPC code for this notebook
Method Detail

getUPC

public long getUPC()
Any class that implements the UPC interface must be able to say what its UPC code is.

Specified by:
getUPC in interface UPC
Returns:
the numeric UPC value. UPC codes are 12 digits in length.

toString

public java.lang.String toString()
return a String describing this Notebook

Overrides:
toString in class java.lang.Object
Returns:
a String description of the Notebook