INF1B: Week 9: Abstract Classes and Interfaces
Week Highlights
By the end of this week, you should understand:
From Lecture 15:
- what abstract classes and abstract methods are and when you might use them
- Why you cannot create an instantiation of an abstract method in the general case
- How to creating instantiations of abstract methods by extending them
- When you should use an abstract class and when a concrete class
- What interfaces are and when you would want to use them
- Why the Deadly Diamond of Death is not allowed in Java
- How to implement an interface
- Why Java allows a class to implement several interfaces but not to extend multiple abstract classes
- What the comparable interface is and when to use it
Lecture 15: Abstract Classes and Interfaces
- Slides: Lecture 15 Slides
Lecture 15 ➡ Objects First: read Chapter 12. Further Abstraction Techniques.
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:
There are no sample solutions, because the tasks are individual.
Lab exercises
This week's lab exercises cover inheritance and enums. There are three core exercises.
What should I be doing with assessment?
Continue working on assignment 2 part 2.
License
Creative Commons - Attribution Share A Like