Week highlights
By the time you have completed this week, you should understand:
From Lecture 9:
- What stacks and heaps are for
- What sorts of things are stored in the stack, and what in the heap
- Potential problems with recursion and stacks
- What immutability is
- What the null object is for
- The difference between shallow and deep copies
From Lecture 10:
- why abstraction and modularisation are important
- What encapsulation is for
- When and why you should use private access modifiers
- What different kinds of modifiers there are and how they restrict access
- What immutable data types and when and how they can be useful
Lecture 9: Stack vs Heap
- Slides: 09-stack-vs-heap.pdf
Lecture 9 ➡ Read Stack Memory In Java: Beginner's Guide (With Code Examples) | Zero To Mastery and Java Heap Space vs Stack - Memory Allocation in Java | DigitalOcean.
Lecture 10: Abstraction and Modularisation
- Slides: 10-abstraction.pdf
Lecture 10 ➡ Objects First: read Chapter 3. Object Interaction.
Tutorial: Testing
Instructions and materials: Tutorial4.pdf and Tutorial4_materials.zip
Solutions: Tutorial4_solutions.pdf and Tutorial4_solutions.zip
Lab exercises
This week's lab exercises cover multidimensional arrays, static vs instance methods, and file paths. There are three warmup exercises and three core exercises.
What should I be doing with the assignments?
You need to submit the first part of Assignment 2 on Thursday. This is not graded and you will not lose marks if you don't submit or submit something incomplete. However, feedback on what you have done so far will be really helpful in improving your final submission, so the more you submit this week, the easier you are making it for you to do well in the assessed part.
Assignment 1 is also on going, so keep going with that if you've not finished yet.