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 6: Creating classes; Refactoring

Week Highlights

By the end of this week, you should understand:

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

From Lecture 12 and the demo:

  • What refactoring techniques are why they are helpful for writing good code

Lecture 11: Class Definition

  • Slides: 11-class-definition.pdf

Lecture 11 ➡ Objects First: read Chapter 2. Understanding Class Definitions.

Lecture 11 ➡ Java Tutorial: read Chapter 4. Classes and Objects, stopping at Nested Classes.

Lecture 12: Refactoring

  • Slides: 12-refactoring.pdf

Lecture 12 ➡ See last slide

Assignment 2 Part 1: cohort-level feedback

This is cohort-level feedback based on general trends.

Tutorial: Assignment 2 Peer Evaluation

This tutorial is all about improving your work. You will be discussing and implementing feedback — both personal and general — on your submission for Assignment 2 Part 1. Then you will test your work on other students so that you can improve your work ready for the final Assignment 2 Part 2 submission.

Instructions: Tutorial5.pdf

There are no sample solutions, because the tasks are individual.

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.  You will also get your feedback for Assignment 2 this week, so after your tutorial you can continue working on that.

License
Creative Commons - Attribution Share A Like

Book traversal links for INF1B: Week 6: Creating classes; Refactoring

  • INF1B: Week 5: Stack vs Heap; Abstraction and Modularisation
  • Up
  • INF1B: Week 7: Inheritance

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.