

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
In this lecture, students are instructed to finish reading chapter 3 and take a quiz on constructor overloading, indenting with if statements, and the mail system project. The lecture covers the mailitem class, focusing on constructor name overloading and the use of the 'this' keyword. Students are encouraged to work on lab assignments with a partner and modify the mailitem and mailclient classes to include a subject for new messages.
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!
Reading: finish chapter 3 Quiz Results Mean: 21.5 Median: 22 Max: 25 Distribution: <17.5: 1 17.5 – 19.5: 1 20 – 22: 7 22.5 - 24.5: 5 25: 3 Last Time
When we refer to the name from in the constructor body, which one does it mean? As it turns out, the formal parameter, because it is the ‘closer’ declaration. [Discuss scope here] So, how do we refer to the field from the statement body? We use the keyword this – this is a reference to the current object. So, the expression this.from refers to the from field of the current object. Writing this.from = from; can be thought of as field named from = parameter named from; So, we can give the field and the formal parameter the same name, and we have a way to access them both. Why would we want to? Because sometimes the name is just a good name, and makes more sense than anything else! Partners Jeremy/Paul Hilary/Katherine Ileah/Crystal Justin/Greg Brian/Janet Kerry/Jake Alone – This applies to out of class assignments only. Work with a partner on labs! Josh Tah Lee Jared G Jarred S Nick