Skip to main content

INF1B - top navigation

  • Learn
  • Piazza
  • DRPS

Breadcrumb

  1. Home
  2. INF1B: Informatics 1 - Object Oriented Programming
  3. INF1B: Schedule

INF1B: Week 5: Stack vs Heap; Abstraction and Modularisation

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.

License
Creative Commons - Attribution Share A Like

Book traversal links for INF1B: Week 5: Stack vs Heap; Abstraction and Modularisation

  • INF1B: Week 4: Java API; Collections
  • Up
  • INF1B: Week 6: Creating classes; Refactoring

Navigation links

  • INF1B: Getting Started: setting up the tools you will need for this course
  • INF1B: Resource List
  • INF1B: Schedule
    • INF1B: Week 1: Intro and Basics; Conditionals and Loops
    • INF1B: Week 2: Arrays; Functions
    • INF1B: Week 3: Classes and Objects; Testing and Debugging
    • INF1B: Week 4: Java API; Collections
    • INF1B: Week 5: Stack vs Heap; Abstraction and Modularisation
    • INF1B: Week 6: Creating classes; Refactoring
    • INF1B: Week 7: Inheritance
    • INF1B: Week 8: More Inheritance plus time for assignment
    • INF1B: Week 9: Abstract Classes and Interfaces; Object Design
    • INF1B: Week 10: Version Control
    • INF1B: Week 11: Catch-up Week
  • INF1B: Assessment
  • INF1B: Tutorials
  • INF1B: Labs
  • INF1B: Labs Site
RSS feed

Opencourse privacy & accessibility statements; contact Informatics, ILTS.