Week Highlights
By the end of this week, you should understand:
From Lecture 11:
- The three basic parts of a class
- What a client of a class is
- What test-first design methodology is and why you might want to use it
- Why you might want to create your own toString method
- What happens if you don’t write a constructor for your class
From Lecture 12 and the demo:
- What refactoring techniques are why they are helpful for writing good code
Lecture 11: Class Definition
- Slides: 11-class-definition.pdf
Lecture 11 ➡ Objects First: read Chapter 2. Understanding Class Definitions.
Lecture 11 ➡ Java Tutorial: read Chapter 4. Classes and Objects, stopping at Nested Classes.
Lecture 12: Refactoring
- Slides: 12-refactoring.pdf
Lecture 12 ➡ See last slide
Assignment 2 Part 1: cohort-level feedback
This is cohort-level feedback based on general trends.
Tutorial: Assignment 2 Peer Evaluation
This tutorial is all about improving your work. You will be discussing and implementing feedback — both personal and general — on your submission for Assignment 2 Part 1. Then you will test your work on other students so that you can improve your work ready for the final Assignment 2 Part 2 submission.
Instructions: Tutorial5.pdf
There are no sample solutions, because the tasks are individual.
Lab exercises
This week's lab exercises cover writing your own classes. There are two warmup exercises and four core exercises.
What should I be doing with assessment?
Assignment 1 is due to be submitted by 1200 on Thursday, so if you are still working on that, make sure to finish by then. You will also get your feedback for Assignment 2 this week, so after your tutorial you can continue working on that.