package pack2; /* Author: James Tam Version: March 27, 2017 Original version: September 16, 2003 As the name implies this class is merely a wrapper (or shell) built around a single field, an integer. Normally this is not typically done using the Object-Oriented approach. However, since this example was written merely as a learning example, to illustrate the effect of passing copies of references to methods, it was decided to write a small, comprehendable example, rather than a more complex "real-life" example. */ public class IntegerWrapper { private int num; public IntegerWrapper() { num = (int) (Math.random() * 100); } public IntegerWrapper(int newValue) { num = newValue; } public void setNum(int newValue) { num = newValue; } public int getNum() { return(num); } public String toString() { String s = new String (); s = s + num; return(s); } }