Skip to content

Week 02: Object-Oriented Programming

  • Information Hiding

    After this unit, students should

    • understand the drawback of breaking the abstraction barrier.
    • understand the concept of information hiding to enforce the abstraction barrier.
    • understand how Java uses access modifiers to enforce information hiding.
    • understand what is a constructor and how to write one in Java.
  • Tell, Don't Ask

    After this unit, students should

    • understand what accessor and mutator are used for, and why not to use them.
    • understand the principle of "Tell, Don't Ask".
  • Class Fields

    After this unit, students should

    • understand the difference between instance fields and class fields.
    • understand the meaning of keywords final and static in the context of a field.
    • be able to define and use a class field.
    • be able to use import to access classes from the Java standard libraries.
  • Class Methods

    After this unit, students should

    • understand the differences between instance methods and class methods.
    • be able to define and use a class method.
    • know that the main method is the entry point to a Java program.
    • know the modifiers and parameters required for a main method.
  • Composition

    After this unit, students should

    • understand how to compose a new class from existing classes using composition.
    • understand how composition models the HAS-A relationship.
    • understand how sharing reference values in composed objects could lead to surprising results.
  • Heap and Stack

    After this unit, students should

    • understand when memory is allocated/deallocated from the heap and from the stack.
    • understand the concept of call stack in JVM.
  • Inheritance

    After this unit, students should

    • understand inheritance as a mechanism to extend existing code.
    • understand how inheritance models the IS-A relationship.
    • know how to use the extends keyword for inheritance.
    • understand inheritance as a subtype.
    • be able to determine the run-time type and compile-time type of a variable.
  • Overriding

    After this unit, students should

    • be aware that every class inherits from Object.
    • be familiar with the equals and toString methods.
    • understand what constitutes a method signature.
    • understand method overriding.
    • appreciate the power of method overriding.
    • understand what Java annotations are for, and know when to use @Override.
    • be exposed to the String class and its associated methods, especially the + operator.