INF1B: Week 6: Abstraction and Modularisation; Creating classes
Week Highlights
By the end of this week, you should understand:
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
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
Lecture 10: Abstraction and Modularisation
- Slides: Lecture 10 Slides
Lecture 10 ➡ Objects First: read Chapter 3. Object Interaction.
Lecture 11: Class Definition
- Slides: Lecture 11 Slides
Lecture 11 ➡ Objects First: read Chapter 2. Understanding Class Definitions.
Lecture 11 ➡ Java Tutorial: read Chapter 4. Classes and Objects, stopping at Nested Classes.
Tutorial:
No tutorial
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.
License
Creative Commons - Attribution Share A Like