10-12 Class Notes CS 107

10-12 Class Notes CS 107 - 10-12 Class Notes CS 107...

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

View Full Document Right Arrow Icon
Lab,TA,Tutoring page for the MERRP Supplemental Instruction (SI) resource. MERRP is on the 12th floor of SEO. I have to leave immediately after class at 4:50 today and so will not be able to stick around and answer questions as I often do here in LC D5 Announcements: Questions? Illustrated how a class ( Employee ) can use another class ( Date ). We showed a situation where we implemented an Employee copy constructor which didn't work right. Last Time: Continuation of the Employee copy constructor example, explaining what happened and how to fix it. Time permitting: Arrays Today: The code excerpts used in this situation are: Employee e1 = new Employee(); Employee e2 = new Employee( e1); // copy constructor // changing the startDate for e1 mysteriously changes it also for e2 EmployeeDriver.java // instance variables String name; Date startDate; // copy constructor Employee( Employee other) name = other.name; startDate = other.startDate; { } Employee.java
Background image of page 1

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

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

Page1 / 3

10-12 Class Notes CS 107 - 10-12 Class Notes CS 107...

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