Week Highlights
By the end of this week, you should understand:
From lecture 7:
- what the main benefits of an API are
- How packages can be used to organise code
- Some examples of classes you would find in java.lang and java.util
- How to import packages and refer to packages you haven’t imported
- How to create your own package
From Lecture 8:
- What ArrayLists are and what advantages they have over Arrays
- How to add things to an ArrayList
- Some methods that apply to ArrayLists
- What wrapper classes are and why they might be need in ArrayLists
- What iterators are
- What maps or associative arrays are
- What HashMaps are
Lecture 7: Java API and Documentation
- Slides: 07-java-API.pdf
Lecture 7 ➡ Java Tutorial: read Chapter 8. Packages and Chapter 9. Numbers and Strings.
Lecture 7 ➡ Objects First: read Appendix I: Javadoc and Appendix J: Program Style Guide.
Lecture 8: Collections
- Slides: 08-collections.pdf
Lecture 8 ➡ Objects First: read Chapter 4 Grouping Objects.
Tutorial 3: Code Golf (Practice for Assignment 2)
Instructions and materials: Tutorial3.pdf and ASCIIDice.zip
Solutions: Tutorial3_solutions.pdf and Tutorial3_solutions.zip
Lab exercises
This week's lab exercises cover functions, standard input/output (STD I/O) and error handling, character manipulation, and recursion. There are two warmup exercises, six core exercises, and one optional exercise.
What should I be doing with assessment?
You should be continuing with Assignment 1. Assignment 2 is also released this week, so you should read through the assignment sheet and start to think about how you might approach it.