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 4: Java API; Collections

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.

License
Creative Commons - Attribution Share A Like

Book traversal links for INF1B: Week 4: Java API; Collections

  • INF1B: Week 3: Classes and Objects; Testing and Debugging
  • Up
  • INF1B: Week 5: Stack vs Heap; Abstraction and Modularisation

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.