{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

09-27 Class Notes CS 107 - checking 1 Can't set multiple...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Announcements: Midterm #1 this week both in lab (T/W) and in class (Wed). Questions? Last Time: Classes: Date example Today: ...continuing in developing the Date example further Date d1; d1 = new Date(); Date d2 = new Date(); Remember memory model of what happens when we create an object: Problems / Solutions for various steps along the way: Can set invalid values Make data members (aka instance variables private and use get and set methods to manipulate those values. In the set methods we can add code to do error
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: checking. 1. Can't set multiple values with one method call 2. Can't set a month value with an int, as opposed to a String value 3. Currently we need two steps to create an object and then set its values 4. We want to be able to share code between Constructors 5. How can we print out an object neatly? 6. How can we do a deep comparison of objects? 7. How can we make a copy of an object? 8. 09-27 Class Notes CS 107 Monday, September 27, 2010 3:50 PM 107 Fall 2010 Page 1...
View Full Document

{[ snackBarMessage ]}