Data Structures, Algorithms, & Applications in Java
Chapter 1, Exercise 19

The code for CurrencyWithClone.clone is given below.


/** make a clone */
public Object clone()
      {return new CurrencyWithClone(getSign(), getDollars(), getCents());}