This preview shows page 1. Sign up to view the full content.
Unformatted text preview: this as the first action in the constructor ] To do this use this( . . parameters here); which will chain to the matching Constructor in the class. Problem: f. * Here+ How can we make a copy of an object? [ copy constructor] Deep vs. Shallow copy of an object: Consider having an Employee class that itself has in instance of Date . Create a copy constructor for the Employee class. What happens to the Date? g. How can we do a deep comparison of objects? [ implement an equals(. .) method ] Problems and [ solutions ], not necessarily in the following order. Last Time & Today: 10-07 Class Notes CS 107 Friday, October 07, 2011 3:08 PM CS 107 Fall 2011 Page 1...
View Full Document
- Fall '11
- Computer Programming