INF1B: Week 7: Refactoring; Inheritance

Week Highlights

By the end of this week, you should understand:

From Lecture 12 and the demo:

  • What refactoring techniques are why they are helpful for writing good code

From Lecture 13: 

  • What UML diagrams are and how they are structured
  • What inheritance is and how it can be helpful
  • How the subclass relationship works, and how to use the ‘is-a’ test to see if one class is a subclass of another
  • What the protected access modifier does
  • How subclasses can override inherited methods
  • How to design an inheritance hierarchy
  • The Object class 

Lecture 12: Refactoring

Lecture 12 ➡ See last slide

Lecture 13: Inheritance A

Lecture 13 ➡ Objects First: read Chapter 10. Improving Structure with Inheritance, stopping at 10.7 Subtyping for now

Tutorial: Assignment 2 Part 1: cohort-level feedback

This is cohort-level feedback based on general trends.

Lab exercises

This week's lab exercises cover collection classes, packages and file I/O. There are three warmup exercises, three core exercises, and one optional exercise.

What should I be doing with assessment?

Assignment 2 is released on Monday.  You should get started on this as soon as possible because you will need to submit your first draft at the end of next week.

License
Creative Commons - Attribution Share A Like