·       Basic Ruby:

o  For Project Let’s Code! (17 lectures)

·       Java:

o  IS201 OOAD

o  IS200 Foundations (review)

o  IS200 Foundations


For IS201 (OOAD)



Time (mins)

Exceptions (~100 mins)

Exceptions 1: intro

·         Get a brief overview of how a method can “inform” its caller that something wrong has occurred using exceptions rather than returning a value.


Exceptions 2: try/catch Example

·         Use the try and catch keywords to write try and catch blocks (catch blocks are aka exception handlers).

·         Be able to trace the flow of statement execution when an exception occurs, or if no exception occurs in the try block.

·         Be able to read API documentation on what exceptions a method may throw when called


Exceptions 3: multiple catch blocks

·         Be able to use the exception object in a catch block and call its methods such as getMessage() and printStackTrace().

·         Know that exceptions are classes in Java. Be able to read API documentation about exception classes

·         Be able to use multiple catch blocks associated with one try block to catch different types of exceptions. Only at most one of the catch blocks will run if an exception occurs.

·         Understand that if you have multiple catch blocks, you must catch sub-exceptions first before super-exceptions.


Exceptions 4: finally keyword

·         Use the “finally” keyword to write an optional finally block.

·         Be able to trace the flow of statement execution when an exception occurs, or if no exception occurs, including code in the finally block. 

·         Understand that the finally block is a good place to insert “cleanup” statements.


Exceptions 5: exception propagation

·         Be able to use the stack trace to pinpoint the source of a problem during debugging

·         Understand how an uncaught exception will be propagated back to the caller, and in turn if it’s uncaught there, will be propagated back to its caller.

·         Understand that if main propagates an exception back to the Java Virtual Machine, the JVM will terminate the program and print the stack trace.


Exceptions 6: Checked vs. unchecked exceptions

·         Understand that an unchecked exception is basically a direct or indirect child class of java.lang.RuntimeException. All other exceptions that are direct/indirect child classes of java.lang.Exception are checked exceptions.

·         Be able to determine if an exception class is checked or unchecked by studying the inheritance tree in the API documentation.

·         Understand that a checked exception needs to be explicitly caught, or declared to be propagated back to the caller using the “throws” keyword in the method signature. Failure to do so will cause a compilation error “unreported exception must be caught or declared to be thrown”. Unchecked exceptions do not have this constraint.


Exceptions 7: Writing your own exception classes

·         Distinguish between the throw keyword and throws keyword and where they are used

·         Use the throws keyword in a method signature to declare that a method might throw to the caller one or more types of exception.

·         Use the throw and new keywords to create an exception object in a method, to be thrown back to the method caller.

·         Be able to write a custom-written exception class by extending Exception or some other child class of Exception. Be able to write constructor(s) in your custom-written exception class. Know how to make your custom-written exception class a checked or unchecked exception by extending the correct class.



Modifiers: final, abstract and static

·         Know that Java has the following accessibility modifiers: public, protected, private

·         Know that Java has the following special modifiers: final, abstract, static

·         Understand the implications when the final modifier is applied to methods, variables and classes

·         Understand the implications when the abstract modifier is applied to methods and classes (more details about abstract classes/methods will be covered in “inheritance”)

·         Understand the implications when the static modifier is applied to methods and attributes

·         Debug the compilation error “non-static variable cannot be referenced from a static context”



for-each loop (a.k.a. enhanced for-loop)

·         Learn about Java’s enhanced for-loop and use it as an alternative to the traditional for-loop. Two examples – one using an array of ints, and another using an array of objects – are shown.

·         Know the limitations of the enhanced for-loop (compared to the traditional for-loop)


Using HashMaps

·         Introduce the HashMap as a lookup table. Understand that keys are unique in a HashMap.

·         Get familiar with some useful methods including put(), get(), remove(), isEmpty(), keySet(), values()


Using Iterators

·         Show how iterators can be used to move through a collection (array, ArrayList, or any other types of Collection objects, such as a Set or Collection)

·         Understand that an advantage of using iterators is that its usage is independent of the underlying list’s implementation.


Inheritance (~130 mins)

Inheritance 1: First Demo of Inheritance

·         Use the extends keyword in Java to indicate that a class is to be a child/sub class of another class

·         Understand the terms child/sub and parent/super classes

·         Understand that when a child class will inherit all the attributes and methods (except constructors) from the parent class


Inheritance 2: UML Depiction of Inheritance

·         Be able to read and draw UML class diagrams with the inheritance arrow to depict inheritance relationships between classes

·         Be able to use “is a” to appropriately describe relationships between classes

·         Understand that as you go up the inheritance tree, classes become more generic. As you go down, classes become more specialized.


Inheritance 3: Single vs. Multiple Inheritance

·         Understand the differences between single class inheritance and multiple class inheritance

·         Know that Java only supports single class inheritance, and some other languages, such as C++ support multiple class inheritance

·         Know that all Java classes (except java.lang.Object) have only 1 parent class. If you do not use the extends keyword to explicitly indicate a parent class, Java will automatically insert “extends Object” for you in the class signature.

·         Be aware that java.lang.Object has got several important methods such as clone(), equals() and toString() that will be inherited to all classes.


Inheritance 4: Using the protected keyword

·         Understand that there are 4 categories of accessibility for methods and attributes in Java: private, (default), protected and public

·         Understand the implication when an attribute or method is declared as private, and that it can only be directly accessed from within the same class.

·         Understand the implication when an attribute or method is declared as protected, and that it can be directly accessed only from within the same class or a sub-class.

·         Understand that the principle of encapsulation requires you to declare a method/attribute to be “as private as possible”.


Inheritance 5: Method overriding

·         Understand what is method overriding, and that it is different from method overloading

·         When overriding a method in a child class, the name, input parameters and return type must be the same. The accessibility modifier can be the same or “more public”.


Inheritance 6: Constructor chaining using the super keyword

·         Know that constructors are not inherited from the parent class

·         Know that if you do not write a constructor for a class, Java will provide a default constructor for that class

·         Use the this keyword to invoke an overloaded constructor in the same class (horizontal constructor chaining)

·         Use the super keyword to invoke a constructor in the parent class. (vertical constructor chaining)

·         Understand that if a constructor does not have a super or this call as the first statement, Java will automatically insert “super();” as the first statement in that constructor.

·         Be able to trace the sequence of execution when the super or this keywords are used in constructor chaining.


Inheritance 7: Variable types and Object types

·         Understand that Java is a strongly typed language and that both variables and instances have types.

·         Understand that it is possible for a variable of superclass type to be able to store the address of an object of child class type (but not the other way round). You cannot use that variable to call a method defined in the child class though, unless that method already exists in the super class.


Inheritance 8: instanceof and Type (Class) Casting

·         Use the instanceof operator in Java to check if an instance is of a particular type

·         Perform class casting using the cast operator () in order to call the methods of an object that is being referred to by a variable of its super class.


Inheritance 9 Overriding the equals Method

·         Understand why you may want to override the equals method inherited from java.lang.Object to provide “custom” equality comparison.


Inheritance 10: Abstract methods

·         Know that methods can be categorized as concrete methods and abstract methods

·         Understand the implications when a method is declared abstract, and that an abstract method has no code body.

·         Understand the difference between an “empty” method body (as in the case of a concrete method with no statements between the opening and closing curly braces) and no code body (as in the case of an abstract method)

·         Know that abstract methods can only exist in an abstract class (not a concrete class)


Inheritance 11: Abstract classes

·         Know that an abstract class cannot be instantiated but may contain both abstract or/& concrete methods

·         Abstract classes are useful as parent classes, and you can declare a variable of type abstract class even though you cannot instantiate one.

·         Understand that abstract method inherited to a child class must be overridden if you want the child class to be a concrete class, because concrete classes cannot contain abstract methods.

·         Be able to depict an abstract class or method in a UML diagram by italicizing the class/method names.


Inheritance 12: Interfaces

·         Use the interface keyword to declare an interface. Use the implements keyword in the class signature to implement an interface.

·         Be able to depict an interface in a UML class diagram by using the “<<interface>>” stereotype.  Be able to depict “implementing” an interface using the dotted-line arrow in a UML diagram.

·         Understand that you cannot instantiate an interface, but you can declare a variable of the interface type

·         Understand that a class can implements any number of interface, and the implications of implementing an interface for the child class.

·         Be able to do a comparison between interfaces and abstract classes

·         Know that all methods in an interface are implicitly public and abstract (even if you don’t declare them using these keywords)

·         Know that all attributes in an interface are implicit public, static and final (even if you don’t declare them using these keywords)


Arrays (~80 mins)

Arrays 1: Primitive type arrays

·         Understand the syntax for declaring a variable of array type, and that it is considered an object reference variable that stores the address of an array object

·         Arrays are treated as objects in Java. Use the new keyword to create an array object with a fixed number of slots/cells. You cannot change the number of slots once an array object is created.

·         Be able to create arrays for storing primitive values. Use the [] notation to retrieve or set the value at a particular slot.

·         Know that all slots will store the values 0, null or false depending on the type of the array.

·         Use the length attribute of an array to get the number of slots in an array.

·         Iterate through an array to access the values at each slot using a loop.

·         Be able to debug the ArrayIndexOutOfBoundsException runtime exception.

·         Be able to write methods that take in primitive arrays and process them in moderately complex ways

·         Use the short cut syntax to declare an array variable and create an array object using curly braces, and without using the new keyword.


Arrays 2: Object reference type arrays

·         Be able to create arrays for storing non-primitive (object) types.

·         Be able to write methods that take in object arrays and process them in moderately complex ways.

·         Use the short cut syntax to create an object reference type array.


Arrays 3: passing an array of Strings to main

·         Understand what is (String[] args) in the main method’s signature. Be able to use this String array in any way.

·         Be able to pass a series of values to the main method as a String array when running the program from command line.


Arrays 4: Comparing arrays with ArrayLists

·         The assumption here is that the audience is already familiar with java.util.ArrayList. This lecture compares arrays with ArrayLists.


Arrays 5: 2D arrays

·         Know what is a 2D array and the related syntax for declaring a variable for a 2D array, and for creating a new 2D array object

·         Use the [][] notation to retrieve or set the value at a particular slot in a 2D array

·         Be able to visualize a 2D array either as a table, or an array of arrays.

·         Know that the length attribute of a 2D array shows the number of rows, not the total number of slots. The length attribute of each row will give the number of columns for that row.

·         Be familiar with how to create an use a jagged (non-rectangular) 2D array


Arrays 6: 2D array examples

·         Be able to use 2D arrays to perform moderately complex stuff.

·         Use the short cut syntax to create a 2D array without using the new keyword.

·         Extend the idea of working with a 2D array to a 3D array



For IS201 (OOAD) “Closing the Loop” (reviewing topics in IS200)



Time (mins)

Misc. Stuff

++ and -- operator

·         Understand how to use the pre and post increment/decrement operators


Simple Algorithms

·         Examples on how to iterate through an ArrayList to get the biggest element


Boolean expressions and operators

·         Using || and &&


Memory State Diagrams

Memory State Diagrams 1 (Intro)

·         What are MSDs?


Memory State Diagrams 2 (Primitive types)

·         Drawing MSDs for primitive type variables


Memory State Diagrams 3 (Object ref types)

·         Drawing MSDs for object ref type variables


Memory State Diagrams 4 (ArrayLists)

·         Drawing MSDs for ArrayLists (to be treated as an object type)


Memory State Diagrams 5 (Example)

·         A simple full example incorporating all the previous lectures on MSDs



For IS200 (IS Software Foundations)



Time (mins)

Starting with Objects

Objects 1: Classes vs. Objects

·         Have a quick glance at the source code of a class (objective is not to learn how to write a class though)

·         Understand what are constructors and that they are special methods in the class

·         Understand what are getter and setter methods

·         Understand the difference between a class and an object; that a class is a template from which objects can be created (or instantiated)


Objects 2: Creating objects

·         Understand the difference between an object reference variable and a primitive (simple) type variable: the former stores the address of an object.

·         Using the new keyword to create an instance (or object) from a class. One of the constructors will be invoked during instantiation.

·         Calling the object’s method using the dot


Objects 3: Using the API documentation

·         How to read the API documentation for a 3rd party library and the Java standard library with examples


Class Basics

Class Basics: Instance Variables

·         Know the formal syntax for instance variables

·         Understand that instance variables commonly represent internal data and that each instance will have its own values for instance variables

·         Know the default values assigned to instance variables if not explicitly assigned

·         Be aware of the differences between instance variables and local variables – including the scope, requirement to be explicitly initialized before usage.


Class Basics: Methods 1:

·         Know the formal syntax for instance methods

·         Understand that methods represent behavior

·         Learn the terms “parameters” (in the method signature) and “arguments” (in a calling statement)

·         Understand that arguments must match the parameters of a method before it can be called successfully


Class Basics: Methods 2:

·         Define overloaded methods and be aware that overloaded methods must have different parameters

·         Know how to use the this keyword to refer to instance variables in a method in the event that there is a naming conflict between a local variable and an instance variable


Class Basics: Constructors:

·         Identify constructors as special methods that have the same name as the class and no return type in the signature

·         Constructors can be overloaded, but only one of them will be invoked when instantiating a class using the new keyword

·         Define “default constructor” as the constructor with no parameters.

·         Be aware that Java will automatically insert a default constructor into a class if you don’t explicitly write a default constructor.



Avoiding Common Mistakes in Code


Quiz 3 Debrief (2014/15 Term 1)

·         Model solutions and commentary for Q1-5


Quiz 2 Debrief (2013/14 Term 1)

·         Model solutions for Q1 (T/F questions) 


·         Model solutions for Q2


·         Common mistakes made by students