Building Parsers with Java

sjm.examples.cloning
Class Customer

java.lang.Object
  |
  +--sjm.examples.cloning.Customer

public class Customer
extends java.lang.Object
implements java.lang.Cloneable

This class has a properly functioning, public clone() method.


Field Summary
protected  int IQ
           
protected  java.lang.String name
           
 
Constructor Summary
Customer(java.lang.String name, int IQ)
          Construct a customer.
 
Method Summary
 java.lang.Object clone()
          Return a copy of this object.
 int getIQ()
          Check this customer's IQ.
 void setIQ(int IQ)
          Set this customer's IQ.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

IQ

protected int IQ
Constructor Detail

Customer

public Customer(java.lang.String name,
                int IQ)
Construct a customer.
Method Detail

clone

public java.lang.Object clone()
Return a copy of this object.
Overrides:
clone in class java.lang.Object
Returns:
a copy of this object

getIQ

public int getIQ()
Check this customer's IQ.
Returns:
int

setIQ

public void setIQ(int IQ)
Set this customer's IQ.
Parameters:
IQ - int

by Steve Metsker