10-03 Class Notes CS 107

10-03 Class Notes CS 107 - System.out.println()? *...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Solution to in-class and in-lab midterm1 were posted Thursday. Grades to the in-class portion were emailed around earlier this afternoon. Program #2 has been graded, with comments posted in Blackboard. Program #4 description not ready yet, but you will have 2 weeks to complete it from the time it is posted. See the shapes demo, which is the basis for your lab this week See the ShapesDriver.java and PictureDriver.java files Announcements: Questions? Last Time: How can we use either int or String to manipulate month values? [ overloading methods, utility conversion methods ] a. How can we create an object and initialize it all in one step? [ Constructors ] b. How can we prevent setting invalid values for instance variables? [ make instance variables private and create get. . and set. . methods ] c. How can we get nicely formatted output when we display an object using
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println()? * implementing the toString() method ] d. How can we chain code in Constructors so we don't have to write the same code multiple times? [ chain constructors using this as the first action in the constructor ] e. 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? f. How can we do a deep comparison of objects? [ implement an equals(. .) method ] g. Problems and [ solutions ], not necessarily in the following order. Today: 10-03 Class Notes CS 107 Monday, October 03, 2011 12:12 PM CS 107 Fall 2011 Page 1 CS 107 Fall 2011 Page 2...
View Full Document

This note was uploaded on 02/10/2012 for the course COP 2273 taught by Professor Lin during the Fall '11 term at University of Central Florida.

Page1 / 2

10-03 Class Notes CS 107 - System.out.println()? *...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online